aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/ext4
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/dir.c8
-rw-r--r--fs/ext4/extents.c4
-rw-r--r--fs/ext4/file.c2
-rw-r--r--fs/ext4/inline.c2
-rw-r--r--fs/ext4/inode.c6
-rw-r--r--fs/ext4/ioctl.c2
-rw-r--r--fs/ext4/move_extent.c6
-rw-r--r--fs/ext4/namei.c2
-rw-r--r--fs/ext4/super.c2
9 files changed, 17 insertions, 17 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 80a28b297279..dc149d123de5 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -110,7 +110,7 @@ static int ext4_readdir(struct file *filp,
110 int i, stored; 110 int i, stored;
111 struct ext4_dir_entry_2 *de; 111 struct ext4_dir_entry_2 *de;
112 int err; 112 int err;
113 struct inode *inode = filp->f_path.dentry->d_inode; 113 struct inode *inode = file_inode(filp);
114 struct super_block *sb = inode->i_sb; 114 struct super_block *sb = inode->i_sb;
115 int ret = 0; 115 int ret = 0;
116 int dir_has_error = 0; 116 int dir_has_error = 0;
@@ -133,7 +133,7 @@ static int ext4_readdir(struct file *filp,
133 * We don't set the inode dirty flag since it's not 133 * We don't set the inode dirty flag since it's not
134 * critical that it get flushed back to the disk. 134 * critical that it get flushed back to the disk.
135 */ 135 */
136 ext4_clear_inode_flag(filp->f_path.dentry->d_inode, 136 ext4_clear_inode_flag(file_inode(filp),
137 EXT4_INODE_INDEX); 137 EXT4_INODE_INDEX);
138 } 138 }
139 stored = 0; 139 stored = 0;
@@ -494,7 +494,7 @@ static int call_filldir(struct file *filp, void *dirent,
494{ 494{
495 struct dir_private_info *info = filp->private_data; 495 struct dir_private_info *info = filp->private_data;
496 loff_t curr_pos; 496 loff_t curr_pos;
497 struct inode *inode = filp->f_path.dentry->d_inode; 497 struct inode *inode = file_inode(filp);
498 struct super_block *sb; 498 struct super_block *sb;
499 int error; 499 int error;
500 500
@@ -526,7 +526,7 @@ static int ext4_dx_readdir(struct file *filp,
526 void *dirent, filldir_t filldir) 526 void *dirent, filldir_t filldir)
527{ 527{
528 struct dir_private_info *info = filp->private_data; 528 struct dir_private_info *info = filp->private_data;
529 struct inode *inode = filp->f_path.dentry->d_inode; 529 struct inode *inode = file_inode(filp);
530 struct fname *fname; 530 struct fname *fname;
531 int ret; 531 int ret;
532 532
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 5ae1674ec12f..7817ca7c2bbf 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4386,7 +4386,7 @@ static void ext4_falloc_update_inode(struct inode *inode,
4386 */ 4386 */
4387long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) 4387long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
4388{ 4388{
4389 struct inode *inode = file->f_path.dentry->d_inode; 4389 struct inode *inode = file_inode(file);
4390 handle_t *handle; 4390 handle_t *handle;
4391 loff_t new_size; 4391 loff_t new_size;
4392 unsigned int max_blocks; 4392 unsigned int max_blocks;
@@ -4643,7 +4643,7 @@ static int ext4_xattr_fiemap(struct inode *inode,
4643 */ 4643 */
4644int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length) 4644int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
4645{ 4645{
4646 struct inode *inode = file->f_path.dentry->d_inode; 4646 struct inode *inode = file_inode(file);
4647 struct super_block *sb = inode->i_sb; 4647 struct super_block *sb = inode->i_sb;
4648 ext4_lblk_t first_block, stop_block; 4648 ext4_lblk_t first_block, stop_block;
4649 struct address_space *mapping = inode->i_mapping; 4649 struct address_space *mapping = inode->i_mapping;
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 405565a62277..c00ea7945eb5 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -167,7 +167,7 @@ static ssize_t
167ext4_file_write(struct kiocb *iocb, const struct iovec *iov, 167ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
168 unsigned long nr_segs, loff_t pos) 168 unsigned long nr_segs, loff_t pos)
169{ 169{
170 struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; 170 struct inode *inode = file_inode(iocb->ki_filp);
171 ssize_t ret; 171 ssize_t ret;
172 172
173 /* 173 /*
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 387c47c6cda9..8106dca95456 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1298,7 +1298,7 @@ int ext4_read_inline_dir(struct file *filp,
1298 int i, stored; 1298 int i, stored;
1299 struct ext4_dir_entry_2 *de; 1299 struct ext4_dir_entry_2 *de;
1300 struct super_block *sb; 1300 struct super_block *sb;
1301 struct inode *inode = filp->f_path.dentry->d_inode; 1301 struct inode *inode = file_inode(filp);
1302 int ret, inline_size = 0; 1302 int ret, inline_size = 0;
1303 struct ext4_iloc iloc; 1303 struct ext4_iloc iloc;
1304 void *dir_buf = NULL; 1304 void *dir_buf = NULL;
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index cbfe13bf5b2a..521bd4ab8abe 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2959,7 +2959,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
2959 ssize_t size, void *private, int ret, 2959 ssize_t size, void *private, int ret,
2960 bool is_async) 2960 bool is_async)
2961{ 2961{
2962 struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; 2962 struct inode *inode = file_inode(iocb->ki_filp);
2963 ext4_io_end_t *io_end = iocb->private; 2963 ext4_io_end_t *io_end = iocb->private;
2964 2964
2965 /* if not async direct IO or dio with 0 bytes write, just return */ 2965 /* if not async direct IO or dio with 0 bytes write, just return */
@@ -3553,7 +3553,7 @@ int ext4_can_truncate(struct inode *inode)
3553 3553
3554int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) 3554int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
3555{ 3555{
3556 struct inode *inode = file->f_path.dentry->d_inode; 3556 struct inode *inode = file_inode(file);
3557 if (!S_ISREG(inode->i_mode)) 3557 if (!S_ISREG(inode->i_mode))
3558 return -EOPNOTSUPP; 3558 return -EOPNOTSUPP;
3559 3559
@@ -4926,7 +4926,7 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
4926 unsigned long len; 4926 unsigned long len;
4927 int ret; 4927 int ret;
4928 struct file *file = vma->vm_file; 4928 struct file *file = vma->vm_file;
4929 struct inode *inode = file->f_path.dentry->d_inode; 4929 struct inode *inode = file_inode(file);
4930 struct address_space *mapping = inode->i_mapping; 4930 struct address_space *mapping = inode->i_mapping;
4931 handle_t *handle; 4931 handle_t *handle;
4932 get_block_t *get_block; 4932 get_block_t *get_block;
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 5747f52f7c72..c2f8e060f636 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -22,7 +22,7 @@
22 22
23long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 23long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
24{ 24{
25 struct inode *inode = filp->f_dentry->d_inode; 25 struct inode *inode = file_inode(filp);
26 struct super_block *sb = inode->i_sb; 26 struct super_block *sb = inode->i_sb;
27 struct ext4_inode_info *ei = EXT4_I(inode); 27 struct ext4_inode_info *ei = EXT4_I(inode);
28 unsigned int flags; 28 unsigned int flags;
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index d9cc5ee42f53..796f7ac03706 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -900,7 +900,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
900 pgoff_t orig_page_offset, int data_offset_in_page, 900 pgoff_t orig_page_offset, int data_offset_in_page,
901 int block_len_in_page, int uninit, int *err) 901 int block_len_in_page, int uninit, int *err)
902{ 902{
903 struct inode *orig_inode = o_filp->f_dentry->d_inode; 903 struct inode *orig_inode = file_inode(o_filp);
904 struct page *pagep[2] = {NULL, NULL}; 904 struct page *pagep[2] = {NULL, NULL};
905 handle_t *handle; 905 handle_t *handle;
906 ext4_lblk_t orig_blk_offset; 906 ext4_lblk_t orig_blk_offset;
@@ -1279,8 +1279,8 @@ ext4_move_extents(struct file *o_filp, struct file *d_filp,
1279 __u64 orig_start, __u64 donor_start, __u64 len, 1279 __u64 orig_start, __u64 donor_start, __u64 len,
1280 __u64 *moved_len) 1280 __u64 *moved_len)
1281{ 1281{
1282 struct inode *orig_inode = o_filp->f_dentry->d_inode; 1282 struct inode *orig_inode = file_inode(o_filp);
1283 struct inode *donor_inode = d_filp->f_dentry->d_inode; 1283 struct inode *donor_inode = file_inode(d_filp);
1284 struct ext4_ext_path *orig_path = NULL, *holecheck_path = NULL; 1284 struct ext4_ext_path *orig_path = NULL, *holecheck_path = NULL;
1285 struct ext4_extent *ext_prev, *ext_cur, *ext_dummy; 1285 struct ext4_extent *ext_prev, *ext_cur, *ext_dummy;
1286 ext4_lblk_t block_start = orig_start; 1286 ext4_lblk_t block_start = orig_start;
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index f9ed946a448e..bb97ad6905b2 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -937,7 +937,7 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
937 937
938 dxtrace(printk(KERN_DEBUG "In htree_fill_tree, start hash: %x:%x\n", 938 dxtrace(printk(KERN_DEBUG "In htree_fill_tree, start hash: %x:%x\n",
939 start_hash, start_minor_hash)); 939 start_hash, start_minor_hash));
940 dir = dir_file->f_path.dentry->d_inode; 940 dir = file_inode(dir_file);
941 if (!(ext4_test_inode_flag(dir, EXT4_INODE_INDEX))) { 941 if (!(ext4_test_inode_flag(dir, EXT4_INODE_INDEX))) {
942 hinfo.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version; 942 hinfo.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version;
943 if (hinfo.hash_version <= DX_HASH_TEA) 943 if (hinfo.hash_version <= DX_HASH_TEA)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3d4fb81bacd5..4df78dd3f523 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -553,7 +553,7 @@ void ext4_error_file(struct file *file, const char *function,
553 va_list args; 553 va_list args;
554 struct va_format vaf; 554 struct va_format vaf;
555 struct ext4_super_block *es; 555 struct ext4_super_block *es;
556 struct inode *inode = file->f_dentry->d_inode; 556 struct inode *inode = file_inode(file);
557 char pathname[80], *path; 557 char pathname[80], *path;
558 558
559 es = EXT4_SB(inode->i_sb)->s_es; 559 es = EXT4_SB(inode->i_sb)->s_es;