Commit 6fad7dce authored by Evgeny Sinelnikov's avatar Evgeny Sinelnikov

Update sources 2.6.30 from 2.6.30.2

Fix fh_mutex locking in cifs_reopen_file commit d1ad6a3b00b1580b8dbdedddbd0d1d65411c65f8
parent 038174ef
......@@ -499,9 +499,9 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
return -EBADF;
xid = GetXid();
mutex_unlock(&pCifsFile->fh_mutex);
mutex_lock(&pCifsFile->fh_mutex);
if (!pCifsFile->invalidHandle) {
mutex_lock(&pCifsFile->fh_mutex);
mutex_unlock(&pCifsFile->fh_mutex);
FreeXid(xid);
return 0;
}
......@@ -532,7 +532,7 @@ static int cifs_reopen_file(struct file *file, bool can_flush)
if (full_path == NULL) {
rc = -ENOMEM;
reopen_error_exit:
mutex_lock(&pCifsFile->fh_mutex);
mutex_unlock(&pCifsFile->fh_mutex);
FreeXid(xid);
return rc;
}
......@@ -575,14 +575,14 @@ reopen_error_exit:
cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
if (rc) {
mutex_lock(&pCifsFile->fh_mutex);
mutex_unlock(&pCifsFile->fh_mutex);
cFYI(1, ("cifs_open returned 0x%x", rc));
cFYI(1, ("oplock: %d", oplock));
} else {
reopen_success:
pCifsFile->netfid = netfid;
pCifsFile->invalidHandle = false;
mutex_lock(&pCifsFile->fh_mutex);
mutex_unlock(&pCifsFile->fh_mutex);
pCifsInode = CIFS_I(inode);
if (pCifsInode) {
if (can_flush) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment