aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 8c0d85577314..7a0dd99e4507 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -300,6 +300,8 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,
300 INIT_WORK(&cfile->oplock_break, cifs_oplock_break); 300 INIT_WORK(&cfile->oplock_break, cifs_oplock_break);
301 mutex_init(&cfile->fh_mutex); 301 mutex_init(&cfile->fh_mutex);
302 302
303 cifs_sb_active(inode->i_sb);
304
303 /* 305 /*
304 * If the server returned a read oplock and we have mandatory brlocks, 306 * If the server returned a read oplock and we have mandatory brlocks,
305 * set oplock level to None. 307 * set oplock level to None.
@@ -349,7 +351,8 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
349 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink); 351 struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
350 struct TCP_Server_Info *server = tcon->ses->server; 352 struct TCP_Server_Info *server = tcon->ses->server;
351 struct cifsInodeInfo *cifsi = CIFS_I(inode); 353 struct cifsInodeInfo *cifsi = CIFS_I(inode);
352 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 354 struct super_block *sb = inode->i_sb;
355 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
353 struct cifsLockInfo *li, *tmp; 356 struct cifsLockInfo *li, *tmp;
354 struct cifs_fid fid; 357 struct cifs_fid fid;
355 struct cifs_pending_open open; 358 struct cifs_pending_open open;
@@ -414,6 +417,7 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
414 417
415 cifs_put_tlink(cifs_file->tlink); 418 cifs_put_tlink(cifs_file->tlink);
416 dput(cifs_file->dentry); 419 dput(cifs_file->dentry);
420 cifs_sb_deactive(sb);
417 kfree(cifs_file); 421 kfree(cifs_file);
418} 422}
419 423