aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-20 19:01:31 -0400
committerSteve French <sfrench@us.ibm.com>2010-09-29 15:04:32 -0400
commitba00ba64cf0895e4c2ac507e56306363dc125a90 (patch)
tree8edcd34f27aa623535fc5d640aa75c6dbb0d7a65 /fs/cifs/cifsfs.c
parentd3bf5221d3274b5015ad18a55060b074cca8d2f0 (diff)
cifs: make various routines use the cifsFileInfo->tcon pointer
...where it's available and appropriate. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index eeb8c67a3f29..7193494efc03 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -589,6 +589,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
589 /* note that this is called by vfs setlease with the BKL held 589 /* note that this is called by vfs setlease with the BKL held
590 although I doubt that BKL is needed here in cifs */ 590 although I doubt that BKL is needed here in cifs */
591 struct inode *inode = file->f_path.dentry->d_inode; 591 struct inode *inode = file->f_path.dentry->d_inode;
592 struct cifsFileInfo *cfile = file->private_data;
592 593
593 if (!(S_ISREG(inode->i_mode))) 594 if (!(S_ISREG(inode->i_mode)))
594 return -EINVAL; 595 return -EINVAL;
@@ -599,8 +600,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
599 ((arg == F_WRLCK) && 600 ((arg == F_WRLCK) &&
600 (CIFS_I(inode)->clientCanCacheAll))) 601 (CIFS_I(inode)->clientCanCacheAll)))
601 return generic_setlease(file, arg, lease); 602 return generic_setlease(file, arg, lease);
602 else if (CIFS_SB(inode->i_sb)->tcon->local_lease && 603 else if (cfile->tcon->local_lease && !CIFS_I(inode)->clientCanCacheRead)
603 !CIFS_I(inode)->clientCanCacheRead)
604 /* If the server claims to support oplock on this 604 /* If the server claims to support oplock on this
605 file, then we still need to check oplock even 605 file, then we still need to check oplock even
606 if the local_lease mount option is set, but there 606 if the local_lease mount option is set, but there