Thread (49 messages) 49 messages, 6 authors, 2013-06-04

Re: [PATCH v7 07/34] shrinker: convert superblock shrinkers to new API

From: Glauber Costa <hidden>
Date: 2013-05-20 16:39:08
Also in: linux-fsdevel, linux-mm

On 05/20/2013 12:07 AM, Glauber Costa 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;
Dave,

This is wrong, since mm/vmscan.c will WARN on count returning -1.
Only scan can return -1, and this is probably a mistake while moving
code over. Unless you shout, I am fixing this to "return 0" in this case.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help