summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfsctl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 04474b8ccf0a..7b8f17ee5224 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1214,22 +1214,17 @@ static void nfsd_symlink(struct dentry *parent, const char *name,
{
struct inode *dir = parent->d_inode;
struct dentry *dentry;
- int ret = -ENOMEM;
+ int ret;
inode_lock(dir);
dentry = d_alloc_name(parent, name);
if (!dentry)
- goto out_err;
+ goto out;
ret = __nfsd_symlink(d_inode(parent), dentry, S_IFLNK | 0777, content);
if (ret)
- goto out_err;
+ dput(dentry);
out:
inode_unlock(dir);
- return;
-out_err:
- dput(dentry);
- dentry = ERR_PTR(ret);
- goto out;
}
#else
static inline void nfsd_symlink(struct dentry *parent, const char *name,