lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/19] shrinker: convert superblock shrinkers to new API
On 11/28/2012 03:14 AM, Dave Chinner wrote:
> +static long super_cache_count(struct shrinker *shrink, struct shrink_control *sc)
> +{
> + struct super_block *sb;
> + long total_objects = 0;
> +
> + sb = container_of(shrink, struct super_block, s_shrink);
> +
> + if (!grab_super_passive(sb))
> + return -1;
> +


You're missing the GFP_FS check here. This leads to us doing all the
counting only to find out later, in the scanner, that we won't be able
to free it. Better exit early.


\
 
 \ /
  Last update: 2012-12-20 12:42    [W:0.885 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site