linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VFS: Unlink should revoke all outstanding leases on file
@ 2010-05-14  9:35 Mi Jinlong
  2010-05-14  9:58 ` Jeff Layton
  0 siblings, 1 reply; 21+ messages in thread
From: Mi Jinlong @ 2010-05-14  9:35 UTC (permalink / raw)
  To: NFSv3 list, linux-fsdevel; +Cc: ebiederm, adobriyan, viro, jamie

After client get one file's READ delegation through NFSv4,
server delete this file but don't reclaim the delegation.

This patch add break_lease at may_delete, which can reclaim delegations.

---
 fs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 16df727..17bafc1 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1338,7 +1338,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
 		return -ENOENT;
 	if (victim->d_flags & DCACHE_NFSFS_RENAMED)
 		return -EBUSY;
-	return 0;
+	return break_lease(victim->d_inode, FMODE_WRITE);
 }
 
 /*	Check whether we can create an object with dentry child in directory
-- 
1.7.0




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

end of thread, other threads:[~2010-05-25 10:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14  9:35 [PATCH] VFS: Unlink should revoke all outstanding leases on file Mi Jinlong
2010-05-14  9:58 ` Jeff Layton
2010-05-14 17:17   ` Trond Myklebust
2010-05-14 17:38     ` Jeff Layton
2010-05-14 17:46       ` Jamie Lokier
2010-05-14 18:16         ` Jeremy Allison
2010-05-19 14:06           ` J. Bruce Fields
2010-05-19 16:21             ` Jamie Lokier
2010-05-14 17:59       ` Trond Myklebust
2010-05-14 18:31         ` Trond Myklebust
2010-05-14 19:23           ` J. Bruce Fields
2010-05-19  9:46             ` Mi Jinlong
2010-05-19 15:57               ` J. Bruce Fields
2010-05-20  9:46                 ` Mi Jinlong
2010-05-21 21:07                   ` J. Bruce Fields
2010-05-25 10:14                     ` Mi Jinlong
2010-05-19 16:14             ` Jamie Lokier
2010-05-20  2:21               ` J. Bruce Fields
     [not found]   ` <20100514055844.109d2fdc-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-05-19  9:49     ` Mi Jinlong
2010-05-19 16:03       ` J. Bruce Fields
2010-05-20  9:23         ` Mi Jinlong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).