diff options
author | Kinglong Mee <mijinlong@open-fs.com> | 2018-02-01 15:18:45 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-02-08 19:14:45 +0000 |
commit | 2584ef1b00660d3ea202838a3200bc0dab04420c (patch) | |
tree | 83d4a4a7ffaae355641522df8ee5778668f95e78 /api | |
parent | aa4372bf427152f671de52fc6e02b93ca09f22c7 (diff) |
libgfapi: skip nameless lookup if stat is NULL
Change-Id: If0ad17be2f7d7f88df25966aaf67af963ff4fc41
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/src/glfs-handleops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index a500aae3aee..f8193408ec0 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1292,11 +1292,12 @@ pub_glfs_h_create_from_handle (struct glfs *fs, unsigned char *handle, int len, newinode = inode_find (subvol->itable, loc.gfid); if (newinode) { + if (!stat) /* No need of lookup */ + goto found; + lookup_needed = inode_needs_lookup (newinode, THIS); if (lookup_needed) { loc.inode = newinode; - } else if (!stat) { - goto found; } else { /* populate loc */ GLFS_LOC_FILL_INODE (newinode, loc, fill_out); |