mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
NFSv4: Fix an rcu lock leak
The intention in the original patch was to release the lock when
we put the inode, however something got screwed up.
Reported-by: Jason Yan <[email protected]>
Fixes: 7b410d9ce4 ("pNFS: Delay getting the layout header in..")
Cc: [email protected] # v4.10+
Signed-off-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
0795bf8357
commit
2e84611b3f
1 changed files with 4 additions and 2 deletions
|
|
@ -131,10 +131,11 @@ restart:
|
|||
if (!inode)
|
||||
continue;
|
||||
if (!nfs_sb_active(inode->i_sb)) {
|
||||
rcu_read_lock();
|
||||
rcu_read_unlock();
|
||||
spin_unlock(&clp->cl_lock);
|
||||
iput(inode);
|
||||
spin_lock(&clp->cl_lock);
|
||||
rcu_read_lock();
|
||||
goto restart;
|
||||
}
|
||||
return inode;
|
||||
|
|
@ -170,10 +171,11 @@ restart:
|
|||
if (!inode)
|
||||
continue;
|
||||
if (!nfs_sb_active(inode->i_sb)) {
|
||||
rcu_read_lock();
|
||||
rcu_read_unlock();
|
||||
spin_unlock(&clp->cl_lock);
|
||||
iput(inode);
|
||||
spin_lock(&clp->cl_lock);
|
||||
rcu_read_lock();
|
||||
goto restart;
|
||||
}
|
||||
return inode;
|
||||
|
|
|
|||
Loading…
Reference in a new issue