2008-06-12 19:49:22

by Myklebust, Trond

[permalink] [raw]
Subject: [PATCH 03/15] NFS: Remove attribute update related BKL references

Signed-off-by: Trond Myklebust <[email protected]>
---

fs/nfs/inode.c | 4 ----
fs/nfs/super.c | 4 ----
2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3adabd1..df23f98 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -370,7 +370,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
if ((attr->ia_valid & ~ATTR_FILE) == 0)
return 0;

- lock_kernel();
/* Write all dirty data */
if (S_ISREG(inode->i_mode)) {
filemap_write_and_wait(inode->i_mapping);
@@ -384,7 +383,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr);
if (error == 0)
nfs_refresh_inode(inode, &fattr);
- unlock_kernel();
return error;
}

@@ -700,7 +698,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
inode->i_sb->s_id, (long long)NFS_FILEID(inode));

nfs_inc_stats(inode, NFSIOS_INODEREVALIDATE);
- lock_kernel();
if (is_bad_inode(inode))
goto out_nowait;
if (NFS_STALE(inode))
@@ -749,7 +746,6 @@ __nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
nfs_wake_up_inode(inode);

out_nowait:
- unlock_kernel();
return status;
}

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 226ae6a..39c028e 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -371,8 +371,6 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)
};
int error;

- lock_kernel();
-
error = server->nfs_client->rpc_ops->statfs(server, fh, &res);
if (error < 0)
goto out_err;
@@ -404,12 +402,10 @@ static int nfs_statfs(struct dentry *dentry, struct kstatfs *buf)

buf->f_namelen = server->namelen;

- unlock_kernel();
return 0;

out_err:
dprintk("%s: statfs error = %d\n", __func__, -error);
- unlock_kernel();
return error;
}