diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index a8d8b589ee0e..c16d2a018ab8 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -947,7 +947,7 @@ static int | |||
947 | cifs_posix_lock_test(struct file *file, struct file_lock *flock) | 947 | cifs_posix_lock_test(struct file *file, struct file_lock *flock) |
948 | { | 948 | { |
949 | int rc = 0; | 949 | int rc = 0; |
950 | struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode); | 950 | struct cifsInodeInfo *cinode = CIFS_I(file_inode(file)); |
951 | unsigned char saved_type = flock->fl_type; | 951 | unsigned char saved_type = flock->fl_type; |
952 | 952 | ||
953 | if ((flock->fl_flags & FL_POSIX) == 0) | 953 | if ((flock->fl_flags & FL_POSIX) == 0) |
@@ -974,7 +974,7 @@ cifs_posix_lock_test(struct file *file, struct file_lock *flock) | |||
974 | static int | 974 | static int |
975 | cifs_posix_lock_set(struct file *file, struct file_lock *flock) | 975 | cifs_posix_lock_set(struct file *file, struct file_lock *flock) |
976 | { | 976 | { |
977 | struct cifsInodeInfo *cinode = CIFS_I(file->f_path.dentry->d_inode); | 977 | struct cifsInodeInfo *cinode = CIFS_I(file_inode(file)); |
978 | int rc = 1; | 978 | int rc = 1; |
979 | 979 | ||
980 | if ((flock->fl_flags & FL_POSIX) == 0) | 980 | if ((flock->fl_flags & FL_POSIX) == 0) |
@@ -1548,7 +1548,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock) | |||
1548 | 1548 | ||
1549 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | 1549 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
1550 | netfid = cfile->fid.netfid; | 1550 | netfid = cfile->fid.netfid; |
1551 | cinode = CIFS_I(file->f_path.dentry->d_inode); | 1551 | cinode = CIFS_I(file_inode(file)); |
1552 | 1552 | ||
1553 | if (cap_unix(tcon->ses) && | 1553 | if (cap_unix(tcon->ses) && |
1554 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && | 1554 | (CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability)) && |
@@ -2171,7 +2171,7 @@ int cifs_strict_fsync(struct file *file, loff_t start, loff_t end, | |||
2171 | struct cifs_tcon *tcon; | 2171 | struct cifs_tcon *tcon; |
2172 | struct TCP_Server_Info *server; | 2172 | struct TCP_Server_Info *server; |
2173 | struct cifsFileInfo *smbfile = file->private_data; | 2173 | struct cifsFileInfo *smbfile = file->private_data; |
2174 | struct inode *inode = file->f_path.dentry->d_inode; | 2174 | struct inode *inode = file_inode(file); |
2175 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 2175 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
2176 | 2176 | ||
2177 | rc = filemap_write_and_wait_range(inode->i_mapping, start, end); | 2177 | rc = filemap_write_and_wait_range(inode->i_mapping, start, end); |
@@ -2246,7 +2246,7 @@ int cifs_fsync(struct file *file, loff_t start, loff_t end, int datasync) | |||
2246 | */ | 2246 | */ |
2247 | int cifs_flush(struct file *file, fl_owner_t id) | 2247 | int cifs_flush(struct file *file, fl_owner_t id) |
2248 | { | 2248 | { |
2249 | struct inode *inode = file->f_path.dentry->d_inode; | 2249 | struct inode *inode = file_inode(file); |
2250 | int rc = 0; | 2250 | int rc = 0; |
2251 | 2251 | ||
2252 | if (file->f_mode & FMODE_WRITE) | 2252 | if (file->f_mode & FMODE_WRITE) |
@@ -2480,7 +2480,7 @@ ssize_t cifs_user_writev(struct kiocb *iocb, const struct iovec *iov, | |||
2480 | ssize_t written; | 2480 | ssize_t written; |
2481 | struct inode *inode; | 2481 | struct inode *inode; |
2482 | 2482 | ||
2483 | inode = iocb->ki_filp->f_path.dentry->d_inode; | 2483 | inode = file_inode(iocb->ki_filp); |
2484 | 2484 | ||
2485 | /* | 2485 | /* |
2486 | * BB - optimize the way when signing is disabled. We can drop this | 2486 | * BB - optimize the way when signing is disabled. We can drop this |
@@ -2543,7 +2543,7 @@ ssize_t | |||
2543 | cifs_strict_writev(struct kiocb *iocb, const struct iovec *iov, | 2543 | cifs_strict_writev(struct kiocb *iocb, const struct iovec *iov, |
2544 | unsigned long nr_segs, loff_t pos) | 2544 | unsigned long nr_segs, loff_t pos) |
2545 | { | 2545 | { |
2546 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; | 2546 | struct inode *inode = file_inode(iocb->ki_filp); |
2547 | struct cifsInodeInfo *cinode = CIFS_I(inode); | 2547 | struct cifsInodeInfo *cinode = CIFS_I(inode); |
2548 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 2548 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
2549 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) | 2549 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) |
@@ -2915,7 +2915,7 @@ ssize_t | |||
2915 | cifs_strict_readv(struct kiocb *iocb, const struct iovec *iov, | 2915 | cifs_strict_readv(struct kiocb *iocb, const struct iovec *iov, |
2916 | unsigned long nr_segs, loff_t pos) | 2916 | unsigned long nr_segs, loff_t pos) |
2917 | { | 2917 | { |
2918 | struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; | 2918 | struct inode *inode = file_inode(iocb->ki_filp); |
2919 | struct cifsInodeInfo *cinode = CIFS_I(inode); | 2919 | struct cifsInodeInfo *cinode = CIFS_I(inode); |
2920 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); | 2920 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
2921 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) | 2921 | struct cifsFileInfo *cfile = (struct cifsFileInfo *) |
@@ -3063,7 +3063,7 @@ static struct vm_operations_struct cifs_file_vm_ops = { | |||
3063 | int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma) | 3063 | int cifs_file_strict_mmap(struct file *file, struct vm_area_struct *vma) |
3064 | { | 3064 | { |
3065 | int rc, xid; | 3065 | int rc, xid; |
3066 | struct inode *inode = file->f_path.dentry->d_inode; | 3066 | struct inode *inode = file_inode(file); |
3067 | 3067 | ||
3068 | xid = get_xid(); | 3068 | xid = get_xid(); |
3069 | 3069 | ||
@@ -3356,7 +3356,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
3356 | int rc; | 3356 | int rc; |
3357 | 3357 | ||
3358 | /* Is the page cached? */ | 3358 | /* Is the page cached? */ |
3359 | rc = cifs_readpage_from_fscache(file->f_path.dentry->d_inode, page); | 3359 | rc = cifs_readpage_from_fscache(file_inode(file), page); |
3360 | if (rc == 0) | 3360 | if (rc == 0) |
3361 | goto read_complete; | 3361 | goto read_complete; |
3362 | 3362 | ||
@@ -3371,8 +3371,8 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
3371 | else | 3371 | else |
3372 | cFYI(1, "Bytes read %d", rc); | 3372 | cFYI(1, "Bytes read %d", rc); |
3373 | 3373 | ||
3374 | file->f_path.dentry->d_inode->i_atime = | 3374 | file_inode(file)->i_atime = |
3375 | current_fs_time(file->f_path.dentry->d_inode->i_sb); | 3375 | current_fs_time(file_inode(file)->i_sb); |
3376 | 3376 | ||
3377 | if (PAGE_CACHE_SIZE > rc) | 3377 | if (PAGE_CACHE_SIZE > rc) |
3378 | memset(read_data + rc, 0, PAGE_CACHE_SIZE - rc); | 3378 | memset(read_data + rc, 0, PAGE_CACHE_SIZE - rc); |
@@ -3381,7 +3381,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page, | |||
3381 | SetPageUptodate(page); | 3381 | SetPageUptodate(page); |
3382 | 3382 | ||
3383 | /* send this page to the cache */ | 3383 | /* send this page to the cache */ |
3384 | cifs_readpage_to_fscache(file->f_path.dentry->d_inode, page); | 3384 | cifs_readpage_to_fscache(file_inode(file), page); |
3385 | 3385 | ||
3386 | rc = 0; | 3386 | rc = 0; |
3387 | 3387 | ||