diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-10-15 15:34:04 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-17 21:32:05 -0400 |
commit | b33879aa834ebe03ced3dca4e3b822bd8894a474 (patch) | |
tree | 9475bb683f03180a5fe7909d4182bb5273f5d7a6 /fs/cifs | |
parent | 4477288a103631980750c86547d1fd54bfd2ba7d (diff) |
cifs: move cifsFileInfo_put to file.c
...and make it non-inlined in preparation for the move of most of
cifs_close to it.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsglob.h | 10 | ||||
-rw-r--r-- | fs/cifs/file.c | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 53899a8d7c4a..18ee0adda306 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -408,15 +408,7 @@ static inline void cifsFileInfo_get(struct cifsFileInfo *cifs_file) | |||
408 | atomic_inc(&cifs_file->count); | 408 | atomic_inc(&cifs_file->count); |
409 | } | 409 | } |
410 | 410 | ||
411 | /* Release a reference on the file private data */ | 411 | void cifsFileInfo_put(struct cifsFileInfo *cifs_file); |
412 | static inline void cifsFileInfo_put(struct cifsFileInfo *cifs_file) | ||
413 | { | ||
414 | if (atomic_dec_and_test(&cifs_file->count)) { | ||
415 | cifs_put_tlink(cifs_file->tlink); | ||
416 | dput(cifs_file->dentry); | ||
417 | kfree(cifs_file); | ||
418 | } | ||
419 | } | ||
420 | 412 | ||
421 | /* | 413 | /* |
422 | * One of these for each file inode | 414 | * One of these for each file inode |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 26048dc9069a..a3634e43bd4f 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -266,6 +266,16 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file, | |||
266 | return pCifsFile; | 266 | return pCifsFile; |
267 | } | 267 | } |
268 | 268 | ||
269 | /* Release a reference on the file private data */ | ||
270 | void cifsFileInfo_put(struct cifsFileInfo *cifs_file) | ||
271 | { | ||
272 | if (atomic_dec_and_test(&cifs_file->count)) { | ||
273 | cifs_put_tlink(cifs_file->tlink); | ||
274 | dput(cifs_file->dentry); | ||
275 | kfree(cifs_file); | ||
276 | } | ||
277 | } | ||
278 | |||
269 | int cifs_open(struct inode *inode, struct file *file) | 279 | int cifs_open(struct inode *inode, struct file *file) |
270 | { | 280 | { |
271 | int rc = -EACCES; | 281 | int rc = -EACCES; |