diff options
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 3365e77f6f24..6319db025e7b 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -395,16 +395,19 @@ struct cifsFileInfo { | |||
395 | struct list_head llist; /* list of byte range locks we have. */ | 395 | struct list_head llist; /* list of byte range locks we have. */ |
396 | bool invalidHandle:1; /* file closed via session abend */ | 396 | bool invalidHandle:1; /* file closed via session abend */ |
397 | bool oplock_break_cancelled:1; | 397 | bool oplock_break_cancelled:1; |
398 | atomic_t count; /* reference count */ | 398 | int count; /* refcount -- protected by cifs_file_list_lock */ |
399 | struct mutex fh_mutex; /* prevents reopen race after dead ses*/ | 399 | struct mutex fh_mutex; /* prevents reopen race after dead ses*/ |
400 | struct cifs_search_info srch_inf; | 400 | struct cifs_search_info srch_inf; |
401 | struct work_struct oplock_break; /* work for oplock breaks */ | 401 | struct work_struct oplock_break; /* work for oplock breaks */ |
402 | }; | 402 | }; |
403 | 403 | ||
404 | /* Take a reference on the file private data */ | 404 | /* |
405 | * Take a reference on the file private data. Must be called with | ||
406 | * cifs_file_list_lock held. | ||
407 | */ | ||
405 | static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file) | 408 | static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file) |
406 | { | 409 | { |
407 | atomic_inc(&cifs_file->count); | 410 | ++cifs_file->count; |
408 | } | 411 | } |
409 | 412 | ||
410 | void cifsFileInfo_put(struct cifsFileInfo *cifs_file); | 413 | void cifsFileInfo_put(struct cifsFileInfo *cifs_file); |