aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-15 08:11:51 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-19 11:54:53 -0400
commit76723de0cf5b186afe2f329eeef304c321d52bf8 (patch)
tree677768d360a5288086aa6965ce4db67d556fac03 /fs
parent7a52411107e1ac8f5be6967936ec237f40a1c7e4 (diff)
NFSv4: Fix incorrect semaphore release in _nfs4_do_open()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 153898e1331f..b14145b7b87f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -970,7 +970,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
970 status = -ENOMEM; 970 status = -ENOMEM;
971 opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr); 971 opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr);
972 if (opendata == NULL) 972 if (opendata == NULL)
973 goto err_put_state_owner; 973 goto err_release_rwsem;
974 974
975 status = _nfs4_proc_open(opendata); 975 status = _nfs4_proc_open(opendata);
976 if (status != 0) 976 if (status != 0)
@@ -989,11 +989,11 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st
989 return 0; 989 return 0;
990err_opendata_free: 990err_opendata_free:
991 nfs4_opendata_free(opendata); 991 nfs4_opendata_free(opendata);
992err_release_rwsem:
993 up_read(&clp->cl_sem);
992err_put_state_owner: 994err_put_state_owner:
993 nfs4_put_state_owner(sp); 995 nfs4_put_state_owner(sp);
994out_err: 996out_err:
995 /* Note: clp->cl_sem must be released before nfs4_put_open_state()! */
996 up_read(&clp->cl_sem);
997 *res = NULL; 997 *res = NULL;
998 return status; 998 return status;
999} 999}