diff options
-rw-r--r-- | fs/nfs/dir.c | 8 |
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 | ||