diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-09-20 16:01:31 -0700 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-09-29 19:04:32 +0000 |
commit | ba00ba64cf0895e4c2ac507e56306363dc125a90 (patch) | |
tree | 8edcd34f27aa623535fc5d640aa75c6dbb0d7a65 /fs/cifs/cifsfs.c | |
parent | d3bf5221d3274b5015ad18a55060b074cca8d2f0 (diff) | |
download | talos-op-linux-ba00ba64cf0895e4c2ac507e56306363dc125a90.tar.gz talos-op-linux-ba00ba64cf0895e4c2ac507e56306363dc125a90.zip |
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.c | 4 |
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) /* note that this is called by vfs setlease with the BKL held although I doubt that BKL is needed here in cifs */ struct inode *inode = file->f_path.dentry->d_inode; + struct cifsFileInfo *cfile = file->private_data; if (!(S_ISREG(inode->i_mode))) return -EINVAL; @@ -599,8 +600,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease) ((arg == F_WRLCK) && (CIFS_I(inode)->clientCanCacheAll))) return generic_setlease(file, arg, lease); - else if (CIFS_SB(inode->i_sb)->tcon->local_lease && - !CIFS_I(inode)->clientCanCacheRead) + else if (cfile->tcon->local_lease && !CIFS_I(inode)->clientCanCacheRead) /* If the server claims to support oplock on this file, then we still need to check oplock even if the local_lease mount option is set, but there |