summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-06-11 15:44:22 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-07-15 18:10:56 -0400
commit76566991f94c206d9c5881edcaf99ba72c9e9d61 (patch)
treeed7ec44c59ae916639c1b775ac67cefa229b7e65 /fs
parent52e2e8d37e01edf38ccdccc983fb13ec1456d63d (diff)
downloadlinux-3.10-76566991f94c206d9c5881edcaf99ba72c9e9d61.tar.gz
linux-3.10-76566991f94c206d9c5881edcaf99ba72c9e9d61.tar.bz2
linux-3.10-76566991f94c206d9c5881edcaf99ba72c9e9d61.zip
NFS: Remove BKL from the symlink code
Page cache accesses are serialised using page locks, whereas attribute updates are serialised using inode->i_lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/dir.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 1bdc36bf178..e5f95029192 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1482,13 +1482,9 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
attr.ia_mode = S_IFLNK | S_IRWXUGO;
attr.ia_valid = ATTR_MODE;
- lock_kernel();
-
page = alloc_page(GFP_HIGHUSER);
- if (!page) {
- unlock_kernel();
+ if (!page)
return -ENOMEM;
- }
kaddr = kmap_atomic(page, KM_USER0);
memcpy(kaddr, symname, pathlen);
@@ -1503,7 +1499,6 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
dentry->d_name.name, symname, error);
d_drop(dentry);
__free_page(page);
- unlock_kernel();
return error;
}
@@ -1521,7 +1516,6 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
} else
__free_page(page);
- unlock_kernel();
return 0;
}