summaryrefslogtreecommitdiff
path: root/lockme.h
blob: 7cce97bb55330fbe1e755f11865836e25d8ddbe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef LOCKME_H
#define LOCKME_H

#include <sys/mman.h>

#include "die.h"

static inline void xlockme(void)
{
	if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0)
		panic("Cannot lock pages!\n");
}

static inline void xunlockme(void)
{
	munlockall();
}

#endif /* LOCKME_H */
Jaegeuk Kim <jaegeuk@kernel.org>2016-05-07 10:44:57 -0700 commit0080c5076409d211fbe28d6f07966f7d39e58bad (patch) tree580bffd1c8dfb3de63e4f446bfb3db2d43c4f779 parent79344efb93a26378a91193bed133cee42162cd81 (diff)
f2fs: do not preallocate block unaligned to 4KB
Previously f2fs_preallocate_blocks() tries to allocate unaligned blocks. In f2fs_write_begin(), however, prepare_write_begin() does not skip its allocation due to (len != 4KB). So, it needs locking node page twice unexpectedly. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat