Home
last modified time | relevance | path

Searched hist:"49317 a7f" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/nfs/
H A Ddir.c49317a7f Sun Jul 13 20:28:20 CDT 2014 NeilBrown <neilb@suse.de> NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used.

nfs4_lookup_revalidate only uses 'parent' to get 'dir', and only
uses 'dir' if 'inode == NULL'.

So we don't need to find out what 'parent' or 'dir' is until we
know that 'inode' is NULL.

By moving 'dget_parent' inside the 'if', we can reduce the number of
call sites for 'dput(parent)'.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
49317a7f Sun Jul 13 20:28:20 CDT 2014 NeilBrown <neilb@suse.de> NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used.

nfs4_lookup_revalidate only uses 'parent' to get 'dir', and only
uses 'dir' if 'inode == NULL'.

So we don't need to find out what 'parent' or 'dir' is until we
know that 'inode' is NULL.

By moving 'dget_parent' inside the 'if', we can reduce the number of
call sites for 'dput(parent)'.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>