diff options
author | Zhouyi Zhou <zhouzhouyi@gmail.com> | 2020-03-06 03:45:26 +0000 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-03-16 10:11:59 -0400 |
commit | eb095c14030fbb07fcc61c64b6b39cc297a429c6 (patch) | |
tree | e3ea95f1442fd9edb7900eb9a988210f16ffaf94 /drivers/mmc | |
parent | 68e9a2463d08f870abf8edfe9125b7738f7a63ce (diff) | |
download | linux-eb095c14030fbb07fcc61c64b6b39cc297a429c6.tar.bz2 |
NFS:remove redundant call to nfs_do_access
In function nfs_permission:
1. the rcu_read_lock and rcu_read_unlock around nfs_do_access
is unnecessary because the rcu critical data structure is already
protected in subsidiary function nfs_access_get_cached_rcu. No other
data structure needs rcu_read_lock in nfs_do_access.
2. call nfs_do_access once is enough, because:
2-1. when mask has MAY_NOT_BLOCK bit
The second call to nfs_do_access will not happen.
2-2. when mask has no MAY_NOT_BLOCK bit
The second call to nfs_do_access will happen if res == -ECHILD, which
means the first nfs_do_access goes out after statement if (!may_block).
The second call to nfs_do_access will go through this procedure once
again except continue the work after if (!may_block).
But above work can be performed by only one call to nfs_do_access
without mangling the mask flag.
Tested in x86_64
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions