From 1df22a51a096010d06b8db614ba0b22306c026a0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 30 Jan 2009 11:36:28 -0800 Subject: [PATCH] kclient: don't retain caps if inode is closed and nlink == 0 --- src/kernel/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/caps.c b/src/kernel/caps.c index ab457200b25..99da64d104e 100644 --- a/src/kernel/caps.c +++ b/src/kernel/caps.c @@ -792,7 +792,7 @@ retry_locked: want = file_wanted | used; retain = want; - if (!mdsc->stopping) { + if (!mdsc->stopping && inode->i_nlink > 0) { /* * we cannot retain anything outside of * (wanted|EXPIREABLE), or else we run the risk of the