diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 06:56:47 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-04-05 06:56:47 -0400 |
commit | 6ea7e3873e52902af9ee8c0837450fdb69d54140 (patch) | |
tree | b291dad174446387a166763cfbf3dd351148ecbe /fs/nfs/dir.c | |
parent | 5ddfe0858ea7848c5d4efe3f4319e7543522e0ee (diff) | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
download | op-kernel-dev-6ea7e3873e52902af9ee8c0837450fdb69d54140.zip op-kernel-dev-6ea7e3873e52902af9ee8c0837450fdb69d54140.tar.gz |
Merge branch 'fixes-base' into fixes
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 9cce670..4bfa7d8 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1360,19 +1360,15 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry); nfs_inc_stats(dir, NFSIOS_VFSLOOKUP); - res = ERR_PTR(-ENAMETOOLONG); - if (dentry->d_name.len > NFS_SERVER(dir)->namelen) - goto out; + if (unlikely(dentry->d_name.len > NFS_SERVER(dir)->namelen)) + return ERR_PTR(-ENAMETOOLONG); /* * If we're doing an exclusive create, optimize away the lookup * but don't hash the dentry. */ - if (nfs_is_exclusive_create(dir, flags)) { - d_instantiate(dentry, NULL); - res = NULL; - goto out; - } + if (nfs_is_exclusive_create(dir, flags)) + return NULL; res = ERR_PTR(-ENOMEM); fhandle = nfs_alloc_fhandle(); |