History

NFSv4: Fix incorrect semaphore release in _nfs4_do_open()

Trond Myklebust committed 20 years ago

Commit 76723de1 parent 7a524111 file · +3 −3Browse files

Unified · Split

fs/nfs/nfs4proc.c+3−3
@@ -970,7 +970,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st · 969 unmodified lines
970970 status = -ENOMEM;
971971 opendata = nfs4_opendata_alloc(dentry, sp, flags, sattr);
972972 if (opendata == NULL)
973− goto err_put_state_owner;
973+ goto err_release_rwsem;
974974
975975 status = _nfs4_proc_open(opendata);
976976 if (status != 0)
@@ -989,11 +989,11 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, int flags, st · 12 unmodified lines
989989 return 0;
990990 err_opendata_free:
991991 nfs4_opendata_free(opendata);
992+err_release_rwsem:
993+ up_read(&clp->cl_sem);
992994 err_put_state_owner:
993995 nfs4_put_state_owner(sp);
994996 out_err:
995− /* Note: clp->cl_sem must be released before nfs4_put_open_state()! */
996− up_read(&clp->cl_sem);
997997 *res = NULL;
998998 return status;
999999 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t