aboutsummaryrefslogtreecommitdiffstats
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)
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 1bdc36bf1782..e5f950291928 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
1482 attr.ia_mode = S_IFLNK | S_IRWXUGO; 1482 attr.ia_mode = S_IFLNK | S_IRWXUGO;
1483 attr.ia_valid = ATTR_MODE; 1483 attr.ia_valid = ATTR_MODE;
1484 1484
1485 lock_kernel();
1486
1487 page = alloc_page(GFP_HIGHUSER); 1485 page = alloc_page(GFP_HIGHUSER);
1488 if (!page) { 1486 if (!page)
1489 unlock_kernel();
1490 return -ENOMEM; 1487 return -ENOMEM;
1491 }
1492 1488
1493 kaddr = kmap_atomic(page, KM_USER0); 1489 kaddr = kmap_atomic(page, KM_USER0);
1494 memcpy(kaddr, symname, pathlen); 1490 memcpy(kaddr, symname, pathlen);
@@ -1503,7 +1499,6 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
1503 dentry->d_name.name, symname, error); 1499 dentry->d_name.name, symname, error);
1504 d_drop(dentry); 1500 d_drop(dentry);
1505 __free_page(page); 1501 __free_page(page);
1506 unlock_kernel();
1507 return error; 1502 return error;
1508 } 1503 }
1509 1504
@@ -1521,7 +1516,6 @@ static int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *sym
1521 } else 1516 } else
1522 __free_page(page); 1517 __free_page(page);
1523 1518
1524 unlock_kernel();
1525 return 0; 1519 return 0;
1526} 1520}
1527 1521