f2fs: use percpu_rw_semaphore
[deliverable/linux.git] / fs / f2fs / shrinker.c
index 93606f281bf9c50f21b4206ea553561463f71a04..46c9154259239f284cb3a8a73c20ec7ded2356c4 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/f2fs_fs.h>
 
 #include "f2fs.h"
+#include "node.h"
 
 static LIST_HEAD(f2fs_list);
 static DEFINE_SPINLOCK(f2fs_list_lock);
@@ -25,8 +26,8 @@ static unsigned long __count_nat_entries(struct f2fs_sb_info *sbi)
 
 static unsigned long __count_free_nids(struct f2fs_sb_info *sbi)
 {
-       if (NM_I(sbi)->fcnt > NAT_ENTRY_PER_BLOCK)
-               return NM_I(sbi)->fcnt - NAT_ENTRY_PER_BLOCK;
+       if (NM_I(sbi)->fcnt > MAX_FREE_NIDS)
+               return NM_I(sbi)->fcnt - MAX_FREE_NIDS;
        return 0;
 }
 
This page took 0.025006 seconds and 5 git commands to generate.