summaryrefslogtreecommitdiffstats
path: root/fs/cifs/ioctl.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2010-09-20 16:01:31 -0700
committerSteve French <sfrench@us.ibm.com>2010-09-29 19:04:32 +0000
commitba00ba64cf0895e4c2ac507e56306363dc125a90 (patch)
tree8edcd34f27aa623535fc5d640aa75c6dbb0d7a65 /fs/cifs/ioctl.c
parentd3bf5221d3274b5015ad18a55060b074cca8d2f0 (diff)
downloadop-kernel-dev-ba00ba64cf0895e4c2ac507e56306363dc125a90.zip
op-kernel-dev-ba00ba64cf0895e4c2ac507e56306363dc125a90.tar.gz
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/ioctl.c')
-rw-r--r--fs/cifs/ioctl.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 9d38a71..cc70a61 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -37,11 +37,11 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
int xid;
struct cifs_sb_info *cifs_sb;
#ifdef CONFIG_CIFS_POSIX
+ struct cifsFileInfo *pSMBFile = filep->private_data;
+ struct cifsTconInfo *tcon = pSMBFile->tcon;
__u64 ExtAttrBits = 0;
__u64 ExtAttrMask = 0;
- __u64 caps;
- struct cifsTconInfo *tcon;
- struct cifsFileInfo *pSMBFile = filep->private_data;
+ __u64 caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
#endif /* CONFIG_CIFS_POSIX */
xid = GetXid();
@@ -50,17 +50,6 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
cifs_sb = CIFS_SB(inode->i_sb);
-#ifdef CONFIG_CIFS_POSIX
- tcon = cifs_sb->tcon;
- if (tcon)
- caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
- else {
- rc = -EIO;
- FreeXid(xid);
- return -EIO;
- }
-#endif /* CONFIG_CIFS_POSIX */
-
switch (command) {
case CIFS_IOC_CHECKUMOUNT:
cFYI(1, "User unmount attempted");
OpenPOWER on IntegriCloud