Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
fs/ext4/extents_status.c between commit decae3aab047 ("ext4: make the
extent_status code more robust against ENOMEM failures") from the ext4
tree and commit  "fs: convert fs shrinkers to new scan/count API" from
the akpm tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

diff --cc fs/ext4/extents_status.c
index 91cb110,fb3b95e..0000000
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@@ -903,9 -891,21 +903,20 @@@ static int ext4_inode_touch_time_cmp(vo
                return -1;
  }
  
+ static long ext4_es_count(struct shrinker *shrink, struct shrink_control *sc)
+ {
+       long nr;
+       struct ext4_sb_info *sbi = container_of(shrink,
+                                       struct ext4_sb_info, s_es_shrinker);
+ 
+       nr = percpu_counter_read_positive(&sbi->s_extent_cache_cnt);
+       trace_ext4_es_shrink_enter(sbi->s_sb, sc->nr_to_scan, nr);
+       return nr;
+ }
+ 
 -static long ext4_es_scan(struct shrinker *shrink, struct shrink_control *sc)
 +static int __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
 +                          struct ext4_inode_info *locked_ei)
  {
 -      struct ext4_sb_info *sbi = container_of(shrink,
 -                                      struct ext4_sb_info, s_es_shrinker);
        struct ext4_inode_info *ei;
        struct list_head *cur, *tmp;
        LIST_HEAD(skiped);
@@@ -958,30 -959,8 +969,23 @@@
        list_splice_tail(&skiped, &sbi->s_es_lru);
        spin_unlock(&sbi->s_es_lru_lock);
  
 +      if (locked_ei && nr_shrunk == 0)
 +              nr_shrunk = __es_try_to_reclaim_extents(ei, nr_to_scan);
 +
 +      return nr_shrunk;
 +}
 +
- static int ext4_es_shrink(struct shrinker *shrink, struct shrink_control *sc)
++static long ext4_es_shrink(struct shrinker *shrink, struct shrink_control *sc)
 +{
 +      struct ext4_sb_info *sbi = container_of(shrink,
 +                                      struct ext4_sb_info, s_es_shrinker);
 +      int nr_to_scan = sc->nr_to_scan;
-       int ret, nr_shrunk;
- 
-       ret = percpu_counter_read_positive(&sbi->s_extent_cache_cnt);
-       trace_ext4_es_shrink_enter(sbi->s_sb, nr_to_scan, ret);
- 
-       if (!nr_to_scan)
-               return ret;
++      int nr_shrunk;
 +
 +      nr_shrunk = __ext4_es_shrink(sbi, nr_to_scan, NULL);
 +
-       ret = percpu_counter_read_positive(&sbi->s_extent_cache_cnt);
        trace_ext4_es_shrink_exit(sbi->s_sb, nr_shrunk, ret);
-       return ret;
+       return nr_shrunk;
  }
  
  void ext4_es_register_shrinker(struct ext4_sb_info *sbi)

Attachment: pgpCzGDVgiwuh.pgp
Description: PGP signature

Reply via email to