aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-18 17:20:19 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-18 17:20:19 -0400
commitcae7a073a4c5484cc5713eab606bf54b46724ab3 (patch)
treee5cdcf0376da5b04bca9bbbf8f226abe13f33275 /fs/nfs/dir.c
parentcdce5d6b94b6182f6d8a5b7b52923933e98cbc92 (diff)
NFSv4: Return delegation upon rename or removal of file.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ac331d2d4c4a..72f50c0117b1 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -801,6 +801,7 @@ static int nfs_dentry_delete(struct dentry *dentry)
801 */ 801 */
802static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) 802static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
803{ 803{
804 nfs_inode_return_delegation(inode);
804 if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { 805 if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
805 lock_kernel(); 806 lock_kernel();
806 inode->i_nlink--; 807 inode->i_nlink--;
@@ -1329,6 +1330,7 @@ static int nfs_safe_remove(struct dentry *dentry)
1329 1330
1330 nfs_begin_data_update(dir); 1331 nfs_begin_data_update(dir);
1331 if (inode != NULL) { 1332 if (inode != NULL) {
1333 nfs_inode_return_delegation(inode);
1332 nfs_begin_data_update(inode); 1334 nfs_begin_data_update(inode);
1333 error = NFS_PROTO(dir)->remove(dir, &dentry->d_name); 1335 error = NFS_PROTO(dir)->remove(dir, &dentry->d_name);
1334 /* The VFS may want to delete this inode */ 1336 /* The VFS may want to delete this inode */
@@ -1547,6 +1549,7 @@ go_ahead:
1547 nfs_wb_all(old_inode); 1549 nfs_wb_all(old_inode);
1548 shrink_dcache_parent(old_dentry); 1550 shrink_dcache_parent(old_dentry);
1549 } 1551 }
1552 nfs_inode_return_delegation(old_inode);
1550 1553
1551 if (new_inode) 1554 if (new_inode)
1552 d_delete(new_dentry); 1555 d_delete(new_dentry);