linux-fsdevel.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
       [not found] ` <4BED195F.3070504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Mi Jinlong @ 2010-05-14  9:35 UTC (permalink / raw)
  To: NFSv3 list, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA
  Cc: ebiederm-aS9lmoZGLiVWk0Htik3J/w, adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn,
	jamie-yetKDKU6eevNLxjTenLetw

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



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ 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
     [not found] ` <4BED195F.3070504-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-05-14  9:58   ` Jeff Layton
2010-05-14 17:17     ` Trond Myklebust
     [not found]       ` <1273857471.4732.7.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-05-14 17:38         ` Jeff Layton
     [not found]           ` <20100514133819.5e383485-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-05-14 17:46             ` Jamie Lokier
2010-05-14 18:16               ` Jeremy Allison
2010-05-19 14:06                 ` J. Bruce Fields
     [not found]                   ` <20100519140639.GB4581-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-19 16:21                     ` Jamie Lokier
2010-05-14 17:59             ` Trond Myklebust
2010-05-14 18:31               ` Trond Myklebust
     [not found]                 ` <1273861872.4732.34.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-05-14 19:23                   ` J. Bruce Fields
     [not found]                     ` <20100514192327.GA20192-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-19  9:46                       ` Mi Jinlong
2010-05-19 15:57                         ` J. Bruce Fields
     [not found]                           ` <20100519155700.GE4581-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-20  9:46                             ` Mi Jinlong
     [not found]                               ` <4BF504DE.7010804-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-05-21 21:07                                 ` J. Bruce Fields
     [not found]                                   ` <20100521210738.GK11675-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2010-05-25 10:14                                     ` Mi Jinlong
2010-05-19 16:14                     ` Jamie Lokier
     [not found]                       ` <20100519161419.GB1693-yetKDKU6eevNLxjTenLetw@public.gmane.org>
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).