* [PATCH] NFS: Fix the notifications when renaming onto an existing file
@ 2009-05-12 22:24 Trond Myklebust
[not found] ` <20090512222420.6972.25308.stgit-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2009-05-12 22:24 UTC (permalink / raw)
To: stable; +Cc: linux-nfs, linux-kernel
NFS appears to be returning an unnecessary "delete" notification when
we're doing an atomic rename. See
http://bugzilla.gnome.org/show_bug.cgi?id=575684
The fix is to get rid of the redundant call to d_delete().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
Please apply to 2.6.27 - 2.6.29 stable series...
fs/nfs/dir.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 672368f..3b2f697 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1624,8 +1624,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
} else if (atomic_read(&new_dentry->d_count) > 1)
/* dentry still busy? */
goto out;
- } else
- nfs_drop_nlink(new_inode);
+ }
go_ahead:
/*
@@ -1638,10 +1637,8 @@ go_ahead:
}
nfs_inode_return_delegation(old_inode);
- if (new_inode != NULL) {
+ if (new_inode != NULL)
nfs_inode_return_delegation(new_inode);
- d_delete(new_dentry);
- }
error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
new_dir, &new_dentry->d_name);
@@ -1650,6 +1647,8 @@ out:
if (rehash)
d_rehash(rehash);
if (!error) {
+ if (new_inode != NULL)
+ nfs_drop_nlink(new_inode);
d_move(old_dentry, new_dentry);
nfs_set_verifier(new_dentry,
nfs_save_change_attribute(new_dir));
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [stable] [PATCH] NFS: Fix the notifications when renaming onto an existing file
2009-05-12 22:24 [PATCH] NFS: Fix the notifications when renaming onto an existing file Trond Myklebust
@ 2009-05-12 22:31 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-05-12 22:31 UTC (permalink / raw)
To: Trond Myklebust; +Cc: stable, linux-nfs, linux-kernel
On Tue, May 12, 2009 at 06:24:20PM -0400, Trond Myklebust wrote:
> NFS appears to be returning an unnecessary "delete" notification when
> we're doing an atomic rename. See
>
> http://bugzilla.gnome.org/show_bug.cgi?id=575684
>
> The fix is to get rid of the redundant call to d_delete().
>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> ---
> Please apply to 2.6.27 - 2.6.29 stable series...
Is this already in Linus's tree? If so, what is the git commit id?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [stable] [PATCH] NFS: Fix the notifications when renaming onto an existing file
@ 2009-05-12 22:31 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2009-05-12 22:31 UTC (permalink / raw)
To: Trond Myklebust; +Cc: stable, linux-nfs, linux-kernel
On Tue, May 12, 2009 at 06:24:20PM -0400, Trond Myklebust wrote:
> NFS appears to be returning an unnecessary "delete" notification when
> we're doing an atomic rename. See
>
> http://bugzilla.gnome.org/show_bug.cgi?id=575684
>
> The fix is to get rid of the redundant call to d_delete().
>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> ---
> Please apply to 2.6.27 - 2.6.29 stable series...
Is this already in Linus's tree? If so, what is the git commit id?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [stable] [PATCH] NFS: Fix the notifications when renaming onto an existing file
2009-05-12 22:31 ` Greg KH
(?)
@ 2009-05-12 22:42 ` Trond Myklebust
-1 siblings, 0 replies; 4+ messages in thread
From: Trond Myklebust @ 2009-05-12 22:42 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-nfs, linux-kernel
On Tue, 2009-05-12 at 15:31 -0700, Greg KH wrote:
> On Tue, May 12, 2009 at 06:24:20PM -0400, Trond Myklebust wrote:
> > NFS appears to be returning an unnecessary "delete" notification when
> > we're doing an atomic rename. See
> >
> > http://bugzilla.gnome.org/show_bug.cgi?id=575684
> >
> > The fix is to get rid of the redundant call to d_delete().
> >
> > Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
> > ---
> > Please apply to 2.6.27 - 2.6.29 stable series...
>
> Is this already in Linus's tree? If so, what is the git commit id?
Sorry, I forgot to include that. The commit id in mainline is
b1e4adf4ea41bb8b5a7bfc1a7001f137e65495df.
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-05-12 22:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 22:24 [PATCH] NFS: Fix the notifications when renaming onto an existing file Trond Myklebust
[not found] ` <20090512222420.6972.25308.stgit-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-05-12 22:31 ` [stable] " Greg KH
2009-05-12 22:31 ` Greg KH
2009-05-12 22:42 ` Trond Myklebust
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.