OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cb5ad1
)
f2fs: avoid to drop nat entries due to the negative nr_shrink
author
Jaegeuk Kim
<jaegeuk.kim@samsung.com>
Wed, 19 Mar 2014 01:43:59 +0000
(10:43 +0900)
committer
Jaegeuk Kim
<jaegeuk.kim@samsung.com>
Thu, 20 Mar 2014 13:10:08 +0000
(22:10 +0900)
The try_to_free_nats should not receive the negative nr_shrink.
Otherwise, it can drop all the nat entries by the while loop.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/node.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/node.c
b/fs/f2fs/node.c
index
9a6d8bb
..
d27e65a
100644
(file)
--- a/
fs/f2fs/node.c
+++ b/
fs/f2fs/node.c
@@
-208,7
+208,7
@@
int try_to_free_nats(struct f2fs_sb_info *sbi, int nr_shrink)
{
struct f2fs_nm_info *nm_i = NM_I(sbi);
- if (nm_i->nat_cnt <= NM_WOUT_THRESHOLD)
+ if (nm_i->nat_cnt <= NM_WOUT_THRESHOLD
|| nr_shrink <= 0
)
return 0;
write_lock(&nm_i->nat_tree_lock);