aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-26 23:16:07 -0500
commitd895cb1af15c04c522a25c79cc429076987c089b (patch)
tree895dc9157e28f603d937a58be664e4e440d5530c /fs/ext4
parent9626357371b519f2b955fef399647181034a77fe (diff)
parentd3d009cb965eae7e002ea5badf603ea8f4c34915 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro: "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent locking violations, etc. The most visible changes here are death of FS_REVAL_DOT (replaced with "has ->d_weak_revalidate()") and a new helper getting from struct file to inode. Some bits of preparation to xattr method interface changes. Misc patches by various people sent this cycle *and* ocfs2 fixes from several cycles ago that should've been upstream right then. PS: the next vfs pile will be xattr stuff." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) saner proc_get_inode() calling conventions proc: avoid extra pde_put() in proc_fill_super() fs: change return values from -EACCES to -EPERM fs/exec.c: make bprm_mm_init() static ocfs2/dlm: use GFP_ATOMIC inside a spin_lock ocfs2: fix possible use-after-free with AIO ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero target: writev() on single-element vector is pointless export kernel_write(), convert open-coded instances fs: encode_fh: return FILEID_INVALID if invalid fid_type kill f_vfsmnt vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op nfsd: handle vfs_getattr errors in acl protocol switch vfs_getattr() to struct path default SET_PERSONALITY() in linux/elf.h ceph: prepopulate inodes only when request is aborted d_hash_and_lookup(): export, switch open-coded instances 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 9p: split dropping the acls from v9fs_set_create_acl() ...
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 3882fbc5e215..6dda04f05ef4 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;
@@ -495,7 +495,7 @@ static int call_filldir(struct file *filp, void *dirent,
495{ 495{
496 struct dir_private_info *info = filp->private_data; 496 struct dir_private_info *info = filp->private_data;
497 loff_t curr_pos; 497 loff_t curr_pos;
498 struct inode *inode = filp->f_path.dentry->d_inode; 498 struct inode *inode = file_inode(filp);
499 struct super_block *sb; 499 struct super_block *sb;
500 int error; 500 int error;
501 501
@@ -527,7 +527,7 @@ static int ext4_dx_readdir(struct file *filp,
527 void *dirent, filldir_t filldir) 527 void *dirent, filldir_t filldir)
528{ 528{
529 struct dir_private_info *info = filp->private_data; 529 struct dir_private_info *info = filp->private_data;
530 struct inode *inode = filp->f_path.dentry->d_inode; 530 struct inode *inode = file_inode(filp);
531 struct fname *fname; 531 struct fname *fname;
532 int ret; 532 int ret;
533 533
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 372b2cbee07e..28dd8eeea6a9 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4309,7 +4309,7 @@ static void ext4_falloc_update_inode(struct inode *inode,
4309 */ 4309 */
4310long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len) 4310long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
4311{ 4311{
4312 struct inode *inode = file->f_path.dentry->d_inode; 4312 struct inode *inode = file_inode(file);
4313 handle_t *handle; 4313 handle_t *handle;
4314 loff_t new_size; 4314 loff_t new_size;
4315 unsigned int max_blocks; 4315 unsigned int max_blocks;
@@ -4571,7 +4571,7 @@ static int ext4_xattr_fiemap(struct inode *inode,
4571 */ 4571 */
4572int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length) 4572int ext4_ext_punch_hole(struct file *file, loff_t offset, loff_t length)
4573{ 4573{
4574 struct inode *inode = file->f_path.dentry->d_inode; 4574 struct inode *inode = file_inode(file);
4575 struct super_block *sb = inode->i_sb; 4575 struct super_block *sb = inode->i_sb;
4576 ext4_lblk_t first_block, stop_block; 4576 ext4_lblk_t first_block, stop_block;
4577 struct address_space *mapping = inode->i_mapping; 4577 struct address_space *mapping = inode->i_mapping;
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 7e85a10a6f4f..64848b595b24 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 bc5f871f0893..c0fd1a123f7d 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 88049d8d30cb..9c4f4b1c97f8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2948,7 +2948,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
2948 ssize_t size, void *private, int ret, 2948 ssize_t size, void *private, int ret,
2949 bool is_async) 2949 bool is_async)
2950{ 2950{
2951 struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode; 2951 struct inode *inode = file_inode(iocb->ki_filp);
2952 ext4_io_end_t *io_end = iocb->private; 2952 ext4_io_end_t *io_end = iocb->private;
2953 2953
2954 /* if not async direct IO or dio with 0 bytes write, just return */ 2954 /* if not async direct IO or dio with 0 bytes write, just return */
@@ -3483,7 +3483,7 @@ int ext4_can_truncate(struct inode *inode)
3483 3483
3484int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) 3484int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
3485{ 3485{
3486 struct inode *inode = file->f_path.dentry->d_inode; 3486 struct inode *inode = file_inode(file);
3487 if (!S_ISREG(inode->i_mode)) 3487 if (!S_ISREG(inode->i_mode))
3488 return -EOPNOTSUPP; 3488 return -EOPNOTSUPP;
3489 3489
@@ -4855,7 +4855,7 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
4855 unsigned long len; 4855 unsigned long len;
4856 int ret; 4856 int ret;
4857 struct file *file = vma->vm_file; 4857 struct file *file = vma->vm_file;
4858 struct inode *inode = file->f_path.dentry->d_inode; 4858 struct inode *inode = file_inode(file);
4859 struct address_space *mapping = inode->i_mapping; 4859 struct address_space *mapping = inode->i_mapping;
4860 handle_t *handle; 4860 handle_t *handle;
4861 get_block_t *get_block; 4861 get_block_t *get_block;
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 31f4f56a32d6..721f4d33e148 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 d78c33eed7e5..4e81d47aa8cb 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 2a7015d06a75..3825d6aa8336 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -964,7 +964,7 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
964 964
965 dxtrace(printk(KERN_DEBUG "In htree_fill_tree, start hash: %x:%x\n", 965 dxtrace(printk(KERN_DEBUG "In htree_fill_tree, start hash: %x:%x\n",
966 start_hash, start_minor_hash)); 966 start_hash, start_minor_hash));
967 dir = dir_file->f_path.dentry->d_inode; 967 dir = file_inode(dir_file);
968 if (!(ext4_test_inode_flag(dir, EXT4_INODE_INDEX))) { 968 if (!(ext4_test_inode_flag(dir, EXT4_INODE_INDEX))) {
969 hinfo.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version; 969 hinfo.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version;
970 if (hinfo.hash_version <= DX_HASH_TEA) 970 if (hinfo.hash_version <= DX_HASH_TEA)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 373d46cd5d3f..620cf5615ba2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -450,7 +450,7 @@ void ext4_error_file(struct file *file, const char *function,
450 va_list args; 450 va_list args;
451 struct va_format vaf; 451 struct va_format vaf;
452 struct ext4_super_block *es; 452 struct ext4_super_block *es;
453 struct inode *inode = file->f_dentry->d_inode; 453 struct inode *inode = file_inode(file);
454 char pathname[80], *path; 454 char pathname[80], *path;
455 455
456 es = EXT4_SB(inode->i_sb)->s_es; 456 es = EXT4_SB(inode->i_sb)->s_es;