All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] fs: fix bug where dentry freed earlier, might be getting freed again.
@ 2016-01-30 20:51 Santosh Madiraju
  2016-01-30 21:12 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Santosh Madiraju @ 2016-01-30 20:51 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, madiraju

From: madiraju <madiraju.santosh@gmail.com>

While shrinking the dentry list in shrink_dentry_list function,
if DCACHE_MAY_FREE flag is set, it frees the dentry, and it again
tries to do it in dentry_kill.

Signed-off-by: Santosh Madiraju <madiraju.santosh@gmail.com>
---
 fs/dcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 92d5140..7aa2252 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -986,8 +986,8 @@ static void shrink_dentry_list(struct list_head *list)
 				spin_unlock(&parent->d_lock);
 			continue;
 		}
-
-		__dentry_kill(dentry);
+		if (dentry)
+			__dentry_kill(dentry);
 
 		/*
 		 * We need to prune ancestors too. This is necessary to prevent
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-30 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-30 20:51 [PATCH 2/2] fs: fix bug where dentry freed earlier, might be getting freed again Santosh Madiraju
2016-01-30 21:12 ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.