diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-09-20 19:01:36 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 15:04:33 -0400 |
commit | f7a40689fd1e963cb1006349e050c07584895db5 (patch) | |
tree | 32c0275bde5c7c2a9cb36c672648bb19e392171f /fs/cifs/file.c | |
parent | 0d424ad0a4b8c08e45928bccfa5b4b240097b01b (diff) |
cifs: have cifs_new_fileinfo take a tcon arg
To minimize calls to cifs_sb_tcon and to allow for a clear error path if
a tcon can't be acquired.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 6712c2b0a0ae..e5f463e15c9b 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -277,7 +277,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
277 | 277 | ||
278 | pCifsFile = cifs_new_fileinfo(inode, netfid, file, | 278 | pCifsFile = cifs_new_fileinfo(inode, netfid, file, |
279 | file->f_path.mnt, | 279 | file->f_path.mnt, |
280 | oflags, oplock); | 280 | tcon, oflags, oplock); |
281 | if (pCifsFile == NULL) { | 281 | if (pCifsFile == NULL) { |
282 | CIFSSMBClose(xid, tcon, netfid); | 282 | CIFSSMBClose(xid, tcon, netfid); |
283 | rc = -ENOMEM; | 283 | rc = -ENOMEM; |
@@ -370,7 +370,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
370 | goto out; | 370 | goto out; |
371 | 371 | ||
372 | pCifsFile = cifs_new_fileinfo(inode, netfid, file, file->f_path.mnt, | 372 | pCifsFile = cifs_new_fileinfo(inode, netfid, file, file->f_path.mnt, |
373 | file->f_flags, oplock); | 373 | tcon, file->f_flags, oplock); |
374 | if (pCifsFile == NULL) { | 374 | if (pCifsFile == NULL) { |
375 | rc = -ENOMEM; | 375 | rc = -ENOMEM; |
376 | goto out; | 376 | goto out; |