Commit c21dfb699f35b6b5508fb808bb0ca211a865f2c9
Committed by
Steve French
1 parent
3feb41cff8
Exists in
master
and in
7 other branches
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>
Showing 3 changed files with 13 additions and 18 deletions Side-by-side Diff
fs/cifs/file.c
... | ... | @@ -427,7 +427,7 @@ |
427 | 427 | __u16 netfid; |
428 | 428 | |
429 | 429 | if (file->private_data) |
430 | - pCifsFile = (struct cifsFileInfo *)file->private_data; | |
430 | + pCifsFile = file->private_data; | |
431 | 431 | else |
432 | 432 | return -EBADF; |
433 | 433 | |
... | ... | @@ -565,8 +565,7 @@ |
565 | 565 | int xid, timeout; |
566 | 566 | struct cifs_sb_info *cifs_sb; |
567 | 567 | struct cifsTconInfo *pTcon; |
568 | - struct cifsFileInfo *pSMBFile = | |
569 | - (struct cifsFileInfo *)file->private_data; | |
568 | + struct cifsFileInfo *pSMBFile = file->private_data; | |
570 | 569 | |
571 | 570 | xid = GetXid(); |
572 | 571 | |
... | ... | @@ -641,8 +640,7 @@ |
641 | 640 | { |
642 | 641 | int rc = 0; |
643 | 642 | int xid; |
644 | - struct cifsFileInfo *pCFileStruct = | |
645 | - (struct cifsFileInfo *)file->private_data; | |
643 | + struct cifsFileInfo *pCFileStruct = file->private_data; | |
646 | 644 | char *ptmp; |
647 | 645 | |
648 | 646 | cFYI(1, "Closedir inode = 0x%p", inode); |
... | ... | @@ -863,8 +861,7 @@ |
863 | 861 | length, pfLock, |
864 | 862 | posix_lock_type, wait_flag); |
865 | 863 | } else { |
866 | - struct cifsFileInfo *fid = | |
867 | - (struct cifsFileInfo *)file->private_data; | |
864 | + struct cifsFileInfo *fid = file->private_data; | |
868 | 865 | |
869 | 866 | if (numLock) { |
870 | 867 | rc = CIFSSMBLock(xid, tcon, netfid, length, |
... | ... | @@ -965,7 +962,7 @@ |
965 | 962 | |
966 | 963 | if (file->private_data == NULL) |
967 | 964 | return -EBADF; |
968 | - open_file = (struct cifsFileInfo *) file->private_data; | |
965 | + open_file = file->private_data; | |
969 | 966 | |
970 | 967 | rc = generic_write_checks(file, poffset, &write_size, 0); |
971 | 968 | if (rc) |
... | ... | @@ -1067,7 +1064,7 @@ |
1067 | 1064 | |
1068 | 1065 | if (file->private_data == NULL) |
1069 | 1066 | return -EBADF; |
1070 | - open_file = (struct cifsFileInfo *)file->private_data; | |
1067 | + open_file = file->private_data; | |
1071 | 1068 | |
1072 | 1069 | xid = GetXid(); |
1073 | 1070 | |
... | ... | @@ -1651,8 +1648,7 @@ |
1651 | 1648 | int xid; |
1652 | 1649 | int rc = 0; |
1653 | 1650 | struct cifsTconInfo *tcon; |
1654 | - struct cifsFileInfo *smbfile = | |
1655 | - (struct cifsFileInfo *)file->private_data; | |
1651 | + struct cifsFileInfo *smbfile = file->private_data; | |
1656 | 1652 | struct inode *inode = file->f_path.dentry->d_inode; |
1657 | 1653 | |
1658 | 1654 | xid = GetXid(); |
... | ... | @@ -1756,7 +1752,7 @@ |
1756 | 1752 | FreeXid(xid); |
1757 | 1753 | return rc; |
1758 | 1754 | } |
1759 | - open_file = (struct cifsFileInfo *)file->private_data; | |
1755 | + open_file = file->private_data; | |
1760 | 1756 | |
1761 | 1757 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1762 | 1758 | cFYI(1, "attempting read on write only file instance"); |
... | ... | @@ -1837,7 +1833,7 @@ |
1837 | 1833 | FreeXid(xid); |
1838 | 1834 | return rc; |
1839 | 1835 | } |
1840 | - open_file = (struct cifsFileInfo *)file->private_data; | |
1836 | + open_file = file->private_data; | |
1841 | 1837 | |
1842 | 1838 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) |
1843 | 1839 | cFYI(1, "attempting read on write only file instance"); |
... | ... | @@ -1968,7 +1964,7 @@ |
1968 | 1964 | FreeXid(xid); |
1969 | 1965 | return rc; |
1970 | 1966 | } |
1971 | - open_file = (struct cifsFileInfo *)file->private_data; | |
1967 | + open_file = file->private_data; | |
1972 | 1968 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
1973 | 1969 | pTcon = cifs_sb->tcon; |
1974 | 1970 |
fs/cifs/inode.c
... | ... | @@ -288,7 +288,7 @@ |
288 | 288 | struct inode *inode = filp->f_path.dentry->d_inode; |
289 | 289 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
290 | 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 | 293 | xid = GetXid(); |
294 | 294 | rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); |
... | ... | @@ -515,7 +515,7 @@ |
515 | 515 | struct inode *inode = filp->f_path.dentry->d_inode; |
516 | 516 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
517 | 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 | 520 | xid = GetXid(); |
521 | 521 | rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); |
fs/cifs/ioctl.c
... | ... | @@ -41,8 +41,7 @@ |
41 | 41 | __u64 ExtAttrMask = 0; |
42 | 42 | __u64 caps; |
43 | 43 | struct cifsTconInfo *tcon; |
44 | - struct cifsFileInfo *pSMBFile = | |
45 | - (struct cifsFileInfo *)filep->private_data; | |
44 | + struct cifsFileInfo *pSMBFile = filep->private_data; | |
46 | 45 | #endif /* CONFIG_CIFS_POSIX */ |
47 | 46 | |
48 | 47 | xid = GetXid(); |