diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/indirect.c | 2 | ||||
-rw-r--r-- | fs/f2fs/file.c | 6 | ||||
-rw-r--r-- | fs/fuse/dev.c | 2 | ||||
-rw-r--r-- | fs/fuse/file.c | 24 | ||||
-rw-r--r-- | fs/seq_file.c | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c index c541ab8b64dd..b505a145a593 100644 --- a/fs/ext4/indirect.c +++ b/fs/ext4/indirect.c | |||
@@ -1606,7 +1606,7 @@ err: | |||
1606 | 1606 | ||
1607 | int ext4_ind_punch_hole(struct file *file, loff_t offset, loff_t length) | 1607 | int ext4_ind_punch_hole(struct file *file, loff_t offset, loff_t length) |
1608 | { | 1608 | { |
1609 | struct inode *inode = file->f_path.dentry->d_inode; | 1609 | struct inode *inode = file_inode(file); |
1610 | struct super_block *sb = inode->i_sb; | 1610 | struct super_block *sb = inode->i_sb; |
1611 | ext4_lblk_t first_block, stop_block; | 1611 | ext4_lblk_t first_block, stop_block; |
1612 | struct address_space *mapping = inode->i_mapping; | 1612 | struct address_space *mapping = inode->i_mapping; |
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b7a053d4c6d3..958a46da19ae 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -29,7 +29,7 @@ static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma, | |||
29 | struct vm_fault *vmf) | 29 | struct vm_fault *vmf) |
30 | { | 30 | { |
31 | struct page *page = vmf->page; | 31 | struct page *page = vmf->page; |
32 | struct inode *inode = vma->vm_file->f_path.dentry->d_inode; | 32 | struct inode *inode = file_inode(vma->vm_file); |
33 | struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); | 33 | struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); |
34 | block_t old_blk_addr; | 34 | block_t old_blk_addr; |
35 | struct dnode_of_data dn; | 35 | struct dnode_of_data dn; |
@@ -544,7 +544,7 @@ static int expand_inode_data(struct inode *inode, loff_t offset, | |||
544 | static long f2fs_fallocate(struct file *file, int mode, | 544 | static long f2fs_fallocate(struct file *file, int mode, |
545 | loff_t offset, loff_t len) | 545 | loff_t offset, loff_t len) |
546 | { | 546 | { |
547 | struct inode *inode = file->f_path.dentry->d_inode; | 547 | struct inode *inode = file_inode(file); |
548 | long ret; | 548 | long ret; |
549 | 549 | ||
550 | if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) | 550 | if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) |
@@ -577,7 +577,7 @@ static inline __u32 f2fs_mask_flags(umode_t mode, __u32 flags) | |||
577 | 577 | ||
578 | long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 578 | long f2fs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
579 | { | 579 | { |
580 | struct inode *inode = filp->f_dentry->d_inode; | 580 | struct inode *inode = file_inode(filp); |
581 | struct f2fs_inode_info *fi = F2FS_I(inode); | 581 | struct f2fs_inode_info *fi = F2FS_I(inode); |
582 | unsigned int flags; | 582 | unsigned int flags; |
583 | int ret; | 583 | int ret; |
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index e9bdec0b16d9..11dfa0c3fb46 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -532,7 +532,7 @@ void fuse_request_send_background_locked(struct fuse_conn *fc, | |||
532 | 532 | ||
533 | void fuse_force_forget(struct file *file, u64 nodeid) | 533 | void fuse_force_forget(struct file *file, u64 nodeid) |
534 | { | 534 | { |
535 | struct inode *inode = file->f_path.dentry->d_inode; | 535 | struct inode *inode = file_inode(file); |
536 | struct fuse_conn *fc = get_fuse_conn(inode); | 536 | struct fuse_conn *fc = get_fuse_conn(inode); |
537 | struct fuse_req *req; | 537 | struct fuse_req *req; |
538 | struct fuse_forget_in inarg; | 538 | struct fuse_forget_in inarg; |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index c8071768b950..34b80ba95bad 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c | |||
@@ -355,7 +355,7 @@ static int fuse_wait_on_page_writeback(struct inode *inode, pgoff_t index) | |||
355 | 355 | ||
356 | static int fuse_flush(struct file *file, fl_owner_t id) | 356 | static int fuse_flush(struct file *file, fl_owner_t id) |
357 | { | 357 | { |
358 | struct inode *inode = file->f_path.dentry->d_inode; | 358 | struct inode *inode = file_inode(file); |
359 | struct fuse_conn *fc = get_fuse_conn(inode); | 359 | struct fuse_conn *fc = get_fuse_conn(inode); |
360 | struct fuse_file *ff = file->private_data; | 360 | struct fuse_file *ff = file->private_data; |
361 | struct fuse_req *req; | 361 | struct fuse_req *req; |
@@ -1215,7 +1215,7 @@ static ssize_t __fuse_direct_read(struct file *file, const struct iovec *iov, | |||
1215 | unsigned long nr_segs, loff_t *ppos) | 1215 | unsigned long nr_segs, loff_t *ppos) |
1216 | { | 1216 | { |
1217 | ssize_t res; | 1217 | ssize_t res; |
1218 | struct inode *inode = file->f_path.dentry->d_inode; | 1218 | struct inode *inode = file_inode(file); |
1219 | 1219 | ||
1220 | if (is_bad_inode(inode)) | 1220 | if (is_bad_inode(inode)) |
1221 | return -EIO; | 1221 | return -EIO; |
@@ -1238,7 +1238,7 @@ static ssize_t fuse_direct_read(struct file *file, char __user *buf, | |||
1238 | static ssize_t __fuse_direct_write(struct file *file, const struct iovec *iov, | 1238 | static ssize_t __fuse_direct_write(struct file *file, const struct iovec *iov, |
1239 | unsigned long nr_segs, loff_t *ppos) | 1239 | unsigned long nr_segs, loff_t *ppos) |
1240 | { | 1240 | { |
1241 | struct inode *inode = file->f_path.dentry->d_inode; | 1241 | struct inode *inode = file_inode(file); |
1242 | size_t count = iov_length(iov, nr_segs); | 1242 | size_t count = iov_length(iov, nr_segs); |
1243 | ssize_t res; | 1243 | ssize_t res; |
1244 | 1244 | ||
@@ -1258,7 +1258,7 @@ static ssize_t fuse_direct_write(struct file *file, const char __user *buf, | |||
1258 | size_t count, loff_t *ppos) | 1258 | size_t count, loff_t *ppos) |
1259 | { | 1259 | { |
1260 | struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count }; | 1260 | struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count }; |
1261 | struct inode *inode = file->f_path.dentry->d_inode; | 1261 | struct inode *inode = file_inode(file); |
1262 | ssize_t res; | 1262 | ssize_t res; |
1263 | 1263 | ||
1264 | if (is_bad_inode(inode)) | 1264 | if (is_bad_inode(inode)) |
@@ -1485,7 +1485,7 @@ static const struct vm_operations_struct fuse_file_vm_ops = { | |||
1485 | static int fuse_file_mmap(struct file *file, struct vm_area_struct *vma) | 1485 | static int fuse_file_mmap(struct file *file, struct vm_area_struct *vma) |
1486 | { | 1486 | { |
1487 | if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) { | 1487 | if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) { |
1488 | struct inode *inode = file->f_dentry->d_inode; | 1488 | struct inode *inode = file_inode(file); |
1489 | struct fuse_conn *fc = get_fuse_conn(inode); | 1489 | struct fuse_conn *fc = get_fuse_conn(inode); |
1490 | struct fuse_inode *fi = get_fuse_inode(inode); | 1490 | struct fuse_inode *fi = get_fuse_inode(inode); |
1491 | struct fuse_file *ff = file->private_data; | 1491 | struct fuse_file *ff = file->private_data; |
@@ -1543,7 +1543,7 @@ static void fuse_lk_fill(struct fuse_req *req, struct file *file, | |||
1543 | const struct file_lock *fl, int opcode, pid_t pid, | 1543 | const struct file_lock *fl, int opcode, pid_t pid, |
1544 | int flock) | 1544 | int flock) |
1545 | { | 1545 | { |
1546 | struct inode *inode = file->f_path.dentry->d_inode; | 1546 | struct inode *inode = file_inode(file); |
1547 | struct fuse_conn *fc = get_fuse_conn(inode); | 1547 | struct fuse_conn *fc = get_fuse_conn(inode); |
1548 | struct fuse_file *ff = file->private_data; | 1548 | struct fuse_file *ff = file->private_data; |
1549 | struct fuse_lk_in *arg = &req->misc.lk_in; | 1549 | struct fuse_lk_in *arg = &req->misc.lk_in; |
@@ -1565,7 +1565,7 @@ static void fuse_lk_fill(struct fuse_req *req, struct file *file, | |||
1565 | 1565 | ||
1566 | static int fuse_getlk(struct file *file, struct file_lock *fl) | 1566 | static int fuse_getlk(struct file *file, struct file_lock *fl) |
1567 | { | 1567 | { |
1568 | struct inode *inode = file->f_path.dentry->d_inode; | 1568 | struct inode *inode = file_inode(file); |
1569 | struct fuse_conn *fc = get_fuse_conn(inode); | 1569 | struct fuse_conn *fc = get_fuse_conn(inode); |
1570 | struct fuse_req *req; | 1570 | struct fuse_req *req; |
1571 | struct fuse_lk_out outarg; | 1571 | struct fuse_lk_out outarg; |
@@ -1590,7 +1590,7 @@ static int fuse_getlk(struct file *file, struct file_lock *fl) | |||
1590 | 1590 | ||
1591 | static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) | 1591 | static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) |
1592 | { | 1592 | { |
1593 | struct inode *inode = file->f_path.dentry->d_inode; | 1593 | struct inode *inode = file_inode(file); |
1594 | struct fuse_conn *fc = get_fuse_conn(inode); | 1594 | struct fuse_conn *fc = get_fuse_conn(inode); |
1595 | struct fuse_req *req; | 1595 | struct fuse_req *req; |
1596 | int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK; | 1596 | int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK; |
@@ -1622,7 +1622,7 @@ static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) | |||
1622 | 1622 | ||
1623 | static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) | 1623 | static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) |
1624 | { | 1624 | { |
1625 | struct inode *inode = file->f_path.dentry->d_inode; | 1625 | struct inode *inode = file_inode(file); |
1626 | struct fuse_conn *fc = get_fuse_conn(inode); | 1626 | struct fuse_conn *fc = get_fuse_conn(inode); |
1627 | int err; | 1627 | int err; |
1628 | 1628 | ||
@@ -1645,7 +1645,7 @@ static int fuse_file_lock(struct file *file, int cmd, struct file_lock *fl) | |||
1645 | 1645 | ||
1646 | static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl) | 1646 | static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl) |
1647 | { | 1647 | { |
1648 | struct inode *inode = file->f_path.dentry->d_inode; | 1648 | struct inode *inode = file_inode(file); |
1649 | struct fuse_conn *fc = get_fuse_conn(inode); | 1649 | struct fuse_conn *fc = get_fuse_conn(inode); |
1650 | int err; | 1650 | int err; |
1651 | 1651 | ||
@@ -1702,7 +1702,7 @@ static sector_t fuse_bmap(struct address_space *mapping, sector_t block) | |||
1702 | static loff_t fuse_file_llseek(struct file *file, loff_t offset, int whence) | 1702 | static loff_t fuse_file_llseek(struct file *file, loff_t offset, int whence) |
1703 | { | 1703 | { |
1704 | loff_t retval; | 1704 | loff_t retval; |
1705 | struct inode *inode = file->f_path.dentry->d_inode; | 1705 | struct inode *inode = file_inode(file); |
1706 | 1706 | ||
1707 | /* No i_mutex protection necessary for SEEK_CUR and SEEK_SET */ | 1707 | /* No i_mutex protection necessary for SEEK_CUR and SEEK_SET */ |
1708 | if (whence == SEEK_CUR || whence == SEEK_SET) | 1708 | if (whence == SEEK_CUR || whence == SEEK_SET) |
@@ -2079,7 +2079,7 @@ EXPORT_SYMBOL_GPL(fuse_do_ioctl); | |||
2079 | long fuse_ioctl_common(struct file *file, unsigned int cmd, | 2079 | long fuse_ioctl_common(struct file *file, unsigned int cmd, |
2080 | unsigned long arg, unsigned int flags) | 2080 | unsigned long arg, unsigned int flags) |
2081 | { | 2081 | { |
2082 | struct inode *inode = file->f_dentry->d_inode; | 2082 | struct inode *inode = file_inode(file); |
2083 | struct fuse_conn *fc = get_fuse_conn(inode); | 2083 | struct fuse_conn *fc = get_fuse_conn(inode); |
2084 | 2084 | ||
2085 | if (!fuse_allow_current_process(fc)) | 2085 | if (!fuse_allow_current_process(fc)) |
diff --git a/fs/seq_file.c b/fs/seq_file.c index f2bc3dfd0b88..f9538ea2a756 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c | |||
@@ -339,7 +339,7 @@ EXPORT_SYMBOL(seq_lseek); | |||
339 | /** | 339 | /** |
340 | * seq_release - free the structures associated with sequential file. | 340 | * seq_release - free the structures associated with sequential file. |
341 | * @file: file in question | 341 | * @file: file in question |
342 | * @inode: file->f_path.dentry->d_inode | 342 | * @inode: its inode |
343 | * | 343 | * |
344 | * Frees the structures associated with sequential file; can be used | 344 | * Frees the structures associated with sequential file; can be used |
345 | * as ->f_op->release() if you don't have private data to destroy. | 345 | * as ->f_op->release() if you don't have private data to destroy. |