mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
NFSv4: Fix incorrect semaphore release in _nfs4_do_open()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
7a52411107
commit
76723de0cf
1 changed files with 3 additions and 3 deletions
|
@ -970,7 +970,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
|
||||||
status = -ENOMEM;
|
status = -ENOMEM;
|
||||||
opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr);
|
opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr);
|
||||||
if (opendata == NULL)
|
if (opendata == NULL)
|
||||||
goto err_put_state_owner;
|
goto err_release_rwsem;
|
||||||
|
|
||||||
status = _nfs4_proc_open(opendata);
|
status = _nfs4_proc_open(opendata);
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
|
@ -989,11 +989,11 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
|
||||||
return 0;
|
return 0;
|
||||||
err_opendata_free:
|
err_opendata_free:
|
||||||
nfs4_opendata_free(opendata);
|
nfs4_opendata_free(opendata);
|
||||||
|
err_release_rwsem:
|
||||||
|
up_read(&clp->cl_sem);
|
||||||
err_put_state_owner:
|
err_put_state_owner:
|
||||||
nfs4_put_state_owner(sp);
|
nfs4_put_state_owner(sp);
|
||||||
out_err:
|
out_err:
|
||||||
/* Note: clp->cl_sem must be released before nfs4_put_open_state()! */
|
|
||||||
up_read(&clp->cl_sem);
|
|
||||||
*res = NULL;
|
*res = NULL;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue