Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

f2fs: fix condition in __allow_reserved_blocks()

If reserve_root mount option is not assigned, __allow_reserved_blocks()
will return false, it's not correct, fix it.

Fixes: 7e65be49ed94 ("f2fs: add reserved blocks for root user")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
e75ce117 57e74035

+1 -3
+1 -3
fs/f2fs/f2fs.h
··· 2389 2389 { 2390 2390 if (!inode) 2391 2391 return true; 2392 - if (!test_opt(sbi, RESERVE_ROOT)) 2393 - return false; 2394 2392 if (IS_NOQUOTA(inode)) 2395 2393 return true; 2396 2394 if (uid_eq(F2FS_OPTION(sbi).s_resuid, current_fsuid())) ··· 2409 2411 avail_user_block_count = sbi->user_block_count - 2410 2412 sbi->current_reserved_blocks; 2411 2413 2412 - if (!__allow_reserved_blocks(sbi, inode, cap)) 2414 + if (test_opt(sbi, RESERVE_ROOT) && !__allow_reserved_blocks(sbi, inode, cap)) 2413 2415 avail_user_block_count -= F2FS_OPTION(sbi).root_reserved_blocks; 2414 2416 2415 2417 if (unlikely(is_sbi_flag_set(sbi, SBI_CP_DISABLED))) {