diff options
author | Steve French <sfrench@us.ibm.com> | 2008-11-20 20:00:44 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-11-20 20:14:13 +0000 |
commit | ddb4cbfc53aa0913ee8da059fcbf628d14f40f63 (patch) | |
tree | d77a2d510fa3a3b6556052af024355ed5cfc43d8 /fs/cifs/cifsglob.h | |
parent | bfb59820ee46616a7bdb4af6b8f7e109646de6ec (diff) | |
download | kernel_samsung_tuna-ddb4cbfc53aa0913ee8da059fcbf628d14f40f63.zip kernel_samsung_tuna-ddb4cbfc53aa0913ee8da059fcbf628d14f40f63.tar.gz kernel_samsung_tuna-ddb4cbfc53aa0913ee8da059fcbf628d14f40f63.tar.bz2 |
[CIFS] Do not attempt to close invalidated file handles
If a connection with open file handles has gone down
and come back up and reconnected without reopening
the file handle yet, do not attempt to send an SMB close
request for this handle in cifs_close. We were
checking for the connection being invalid in cifs_close
but since the connection may have been reconnected
we also need to check whether the file handle
was marked invalid (otherwise we could close the
wrong file handle by accident).
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index f1ae1f5..c57c056 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -606,7 +606,15 @@ GLOBAL_EXTERN struct list_head cifs_tcp_ses_list; * changes to the tcon->tidStatus should be done while holding this lock. */ GLOBAL_EXTERN rwlock_t cifs_tcp_ses_lock; -GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; /* protects list inserts on 3 above */ + +/* + * This lock protects the cifs_file->llist and cifs_file->flist + * list operations, and updates to some flags (cifs_file->invalidHandle) + * It will be moved to either use the tcon->stat_lock or equivalent later. + * If cifs_tcp_ses_lock and the lock below are both needed to be held, then + * the cifs_tcp_ses_lock must be grabbed first and released last. + */ +GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; GLOBAL_EXTERN struct list_head GlobalOplock_Q; |