NFSv4: Ensure that we return the delegation on the target of a rename too.
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 3 Jan 2006 08:55:33 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:50 +0000 (14:58 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c

index c0d1a21..e925519 100644 (file)
@@ -1550,8 +1550,10 @@ go_ahead:
        }
        nfs_inode_return_delegation(old_inode);
 
-       if (new_inode)
+       if (new_inode != NULL) {
+               nfs_inode_return_delegation(new_inode);
                d_delete(new_dentry);
+       }
 
        nfs_begin_data_update(old_dir);
        nfs_begin_data_update(new_dir);