aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/vfs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 0f4481e0502d..ad1ad59e3742 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1516,7 +1516,6 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
1516 struct dentry *dentry, *dnew; 1516 struct dentry *dentry, *dnew;
1517 __be32 err, cerr; 1517 __be32 err, cerr;
1518 int host_err; 1518 int host_err;
1519 umode_t mode;
1520 1519
1521 err = nfserr_noent; 1520 err = nfserr_noent;
1522 if (!flen || !plen) 1521 if (!flen || !plen)
@@ -1535,11 +1534,6 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
1535 if (IS_ERR(dnew)) 1534 if (IS_ERR(dnew))
1536 goto out_nfserr; 1535 goto out_nfserr;
1537 1536
1538 mode = S_IALLUGO;
1539 /* Only the MODE ATTRibute is even vaguely meaningful */
1540 if (iap && (iap->ia_valid & ATTR_MODE))
1541 mode = iap->ia_mode & S_IALLUGO;
1542
1543 host_err = mnt_want_write(fhp->fh_export->ex_path.mnt); 1537 host_err = mnt_want_write(fhp->fh_export->ex_path.mnt);
1544 if (host_err) 1538 if (host_err)
1545 goto out_nfserr; 1539 goto out_nfserr;
@@ -1551,11 +1545,11 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
1551 else { 1545 else {
1552 strncpy(path_alloced, path, plen); 1546 strncpy(path_alloced, path, plen);
1553 path_alloced[plen] = 0; 1547 path_alloced[plen] = 0;
1554 host_err = vfs_symlink(dentry->d_inode, dnew, path_alloced, mode); 1548 host_err = vfs_symlink(dentry->d_inode, dnew, path_alloced);
1555 kfree(path_alloced); 1549 kfree(path_alloced);
1556 } 1550 }
1557 } else 1551 } else
1558 host_err = vfs_symlink(dentry->d_inode, dnew, path, mode); 1552 host_err = vfs_symlink(dentry->d_inode, dnew, path);
1559 1553
1560 if (!host_err) { 1554 if (!host_err) {
1561 if (EX_ISSYNC(fhp->fh_export)) 1555 if (EX_ISSYNC(fhp->fh_export))