Commit 52e2e8d3 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Remove BKL from the sillydelete operations

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent bd9bb454
...@@ -884,10 +884,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) ...@@ -884,10 +884,8 @@ static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
NFS_I(inode)->cache_validity |= NFS_INO_INVALID_DATA; NFS_I(inode)->cache_validity |= NFS_INO_INVALID_DATA;
if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
lock_kernel();
drop_nlink(inode); drop_nlink(inode);
nfs_complete_unlink(dentry, inode); nfs_complete_unlink(dentry, inode);
unlock_kernel();
} }
iput(inode); iput(inode);
} }
...@@ -1434,9 +1432,7 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry) ...@@ -1434,9 +1432,7 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
/* Start asynchronous writeout of the inode */ /* Start asynchronous writeout of the inode */
write_inode_now(dentry->d_inode, 0); write_inode_now(dentry->d_inode, 0);
lock_kernel();
error = nfs_sillyrename(dir, dentry); error = nfs_sillyrename(dir, dentry);
unlock_kernel();
return error; return error;
} }
if (!d_unhashed(dentry)) { if (!d_unhashed(dentry)) {
...@@ -1617,9 +1613,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1617,9 +1613,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto out; goto out;
/* silly-rename the existing target ... */ /* silly-rename the existing target ... */
lock_kernel();
err = nfs_sillyrename(new_dir, new_dentry); err = nfs_sillyrename(new_dir, new_dentry);
unlock_kernel();
if (!err) { if (!err) {
new_dentry = rehash = dentry; new_dentry = rehash = dentry;
new_inode = NULL; new_inode = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment