diff options
author | Joe Perches <joe@perches.com> | 2010-07-12 16:50:14 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-08-02 08:40:33 -0400 |
commit | c21dfb699f35b6b5508fb808bb0ca211a865f2c9 (patch) | |
tree | 4c4a96fd88014631c37c282cc2b460906ceaca28 /fs | |
parent | 3feb41cff8264e32a4d23ed829c3ed5369035f51 (diff) |
fs/cifs: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/file.c | 24 | ||||
-rw-r--r-- | fs/cifs/inode.c | 4 | ||||
-rw-r--r-- | fs/cifs/ioctl.c | 3 |
3 files changed, 13 insertions, 18 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 409e4f523e61..b5fb2a0607b0 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -427,7 +427,7 @@ static int cifs_reopen_file(struct file *file, bool can_flush) | |||
427 | __u16 netfid; | 427 | __u16 netfid; |
428 | 428 | ||
429 | if (file->private_data) | 429 | if (file->private_data) |
430 | pCifsFile = (struct cifsFileInfo *)file->private_data; | 430 | pCifsFile = file->private_data; |
431 | else | 431 | else |
432 | return -EBADF; | 432 | return -EBADF; |
433 | 433 | ||
@@ -565,8 +565,7 @@ int cifs_close(struct inode *inode, struct file *file) | |||
565 | int xid, timeout; | 565 | int xid, timeout; |
566 | struct cifs_sb_info *cifs_sb; | 566 | struct cifs_sb_info *cifs_sb; |
567 | struct cifsTconInfo *pTcon; | 567 | struct cifsTconInfo *pTcon; |
568 | struct cifsFileInfo *pSMBFile = | 568 | struct cifsFileInfo *pSMBFile = file->private_data; |
569 | (struct cifsFileInfo *)file->private_data; | ||
570 | 569 | ||
571 | xid = GetXid(); | 570 | xid = GetXid(); |
572 | 571 | ||
@@ -641,8 +640,7 @@ int cifs_closedir(struct inode *inode, struct file *file) | |||
641 | { | 640 | { |
642 | int rc = 0; | 641 | int rc = 0; |
643 | int xid; | 642 | int xid; |
644 | struct cifsFileInfo *pCFileStruct = | 643 | struct cifsFileInfo *pCFileStruct = file->private_data; |
645 | (struct cifsFileInfo *)file->private_data; | ||
646 | char *ptmp; | 644 | char *ptmp; |
647 | 645 | ||
648 | cFYI(1, "Closedir inode = 0x%p", inode); | 646 | cFYI(1, "Closedir inode = 0x%p", inode); |
@@ -863,8 +861,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
863 | length, pfLock, | 861 | length, pfLock, |
864 | posix_lock_type, wait_flag); | 862 | posix_lock_type, wait_flag); |
865 | } else { | 863 | } else { |
866 | struct cifsFileInfo *fid = | 864 | struct cifsFileInfo *fid = file->private_data; |
867 | (struct cifsFileInfo *)file->private_data; | ||
868 | 865 | ||
869 | if (numLock) { | 866 | if (numLock) { |
870 | rc = CIFSSMBLock(xid, tcon, netfid, length, | 867 | rc = CIFSSMBLock(xid, tcon, netfid, length, |
@@ -965,7 +962,7 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
965 | 962 | ||
966 | if (file->private_data == NULL) | 963 | if (file->private_data == NULL) |
967 | return -EBADF; | 964 | return -EBADF; |
968 | open_file = (struct cifsFileInfo *) file->private_data; | 965 | open_file = file->private_data; |
969 | 966 | ||
970 | rc = generic_write_checks(file, poffset, &write_size, 0); | 967 | rc = generic_write_checks(file, poffset, &write_size, 0); |
971 | if (rc) | 968 | if (rc) |
@@ -1067,7 +1064,7 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
1067 | 1064 | ||
1068 | if (file->private_data == NULL) | 1065 | if (file->private_data == NULL) |
1069 | return -EBADF; | 1066 | return -EBADF; |
1070 | open_file = (struct cifsFileInfo *)file->private_data; | 1067 | open_file = file->private_data; |
1071 | 1068 | ||
1072 | xid = GetXid(); | 1069 | xid = GetXid(); |
1073 | 1070 | ||
@@ -1651,8 +1648,7 @@ int cifs_fsync(struct file *file, int datasync) | |||
1651 | int xid; | 1648 | int xid; |
1652 | int rc = 0; | 1649 | int rc = 0; |
1653 | struct cifsTconInfo *tcon; | 1650 | struct cifsTconInfo *tcon; |
1654 | struct cifsFileInfo *smbfile = | 1651 | struct cifsFileInfo *smbfile = file->private_data; |
1655 | (struct cifsFileInfo *)file->private_data; | ||
1656 | struct inode *inode = file->f_path.dentry->d_inode; | 1652 | struct inode *inode = file->f_path.dentry->d_inode; |
1657 | 1653 | ||
1658 | xid = GetXid(); | 1654 | xid = GetXid(); |
@@ -1756,7 +1752,7 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, | |||
1756 | FreeXid(xid); | 1752 | FreeXid(xid); |
1757 | return rc; | 1753 | return rc; |
1758 | } | 1754 | } |
1759 | open_file = (struct cifsFileInfo *)file->private_data; | 1755 | open_file = file->private_data; |
1760 | 1756 | ||
1761 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) | 1757 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1762 | cFYI(1, "attempting read on write only file instance"); | 1758 | cFYI(1, "attempting read on write only file instance"); |
@@ -1837,7 +1833,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
1837 | FreeXid(xid); | 1833 | FreeXid(xid); |
1838 | return rc; | 1834 | return rc; |
1839 | } | 1835 | } |
1840 | open_file = (struct cifsFileInfo *)file->private_data; | 1836 | open_file = file->private_data; |
1841 | 1837 | ||
1842 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) | 1838 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1843 | cFYI(1, "attempting read on write only file instance"); | 1839 | cFYI(1, "attempting read on write only file instance"); |
@@ -1968,7 +1964,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, | |||
1968 | FreeXid(xid); | 1964 | FreeXid(xid); |
1969 | return rc; | 1965 | return rc; |
1970 | } | 1966 | } |
1971 | open_file = (struct cifsFileInfo *)file->private_data; | 1967 | open_file = file->private_data; |
1972 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | 1968 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
1973 | pTcon = cifs_sb->tcon; | 1969 | pTcon = cifs_sb->tcon; |
1974 | 1970 | ||
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 6f0683c68952..fe9b2f5fb492 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -288,7 +288,7 @@ int cifs_get_file_info_unix(struct file *filp) | |||
288 | struct inode *inode = filp->f_path.dentry->d_inode; | 288 | struct inode *inode = filp->f_path.dentry->d_inode; |
289 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 289 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
290 | struct cifsTconInfo *tcon = cifs_sb->tcon; | 290 | struct cifsTconInfo *tcon = cifs_sb->tcon; |
291 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) filp->private_data; | 291 | struct cifsFileInfo *cfile = filp->private_data; |
292 | 292 | ||
293 | xid = GetXid(); | 293 | xid = GetXid(); |
294 | rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); | 294 | rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); |
@@ -515,7 +515,7 @@ int cifs_get_file_info(struct file *filp) | |||
515 | struct inode *inode = filp->f_path.dentry->d_inode; | 515 | struct inode *inode = filp->f_path.dentry->d_inode; |
516 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 516 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
517 | struct cifsTconInfo *tcon = cifs_sb->tcon; | 517 | struct cifsTconInfo *tcon = cifs_sb->tcon; |
518 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) filp->private_data; | 518 | struct cifsFileInfo *cfile = filp->private_data; |
519 | 519 | ||
520 | xid = GetXid(); | 520 | xid = GetXid(); |
521 | rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); | 521 | rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); |
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 505926f1ee6b..9d38a71c8e14 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -41,8 +41,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) | |||
41 | __u64 ExtAttrMask = 0; | 41 | __u64 ExtAttrMask = 0; |
42 | __u64 caps; | 42 | __u64 caps; |
43 | struct cifsTconInfo *tcon; | 43 | struct cifsTconInfo *tcon; |
44 | struct cifsFileInfo *pSMBFile = | 44 | struct cifsFileInfo *pSMBFile = filep->private_data; |
45 | (struct cifsFileInfo *)filep->private_data; | ||
46 | #endif /* CONFIG_CIFS_POSIX */ | 45 | #endif /* CONFIG_CIFS_POSIX */ |
47 | 46 | ||
48 | xid = GetXid(); | 47 | xid = GetXid(); |