aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/block_validity.c1
-rw-r--r--fs/ext4/ext4.h2
-rw-r--r--fs/ext4/extents.c1
-rw-r--r--fs/ext4/ialloc.c8
-rw-r--r--fs/ext4/indirect.c1
-rw-r--r--fs/ext4/inode.c5
-rw-r--r--fs/ext4/ioctl.c34
-rw-r--r--fs/ext4/migrate.c1
-rw-r--r--fs/ext4/namei.c8
-rw-r--r--fs/ext4/page-io.c1
-rw-r--r--fs/ext4/super.c23
-rw-r--r--fs/ext4/xattr_security.c1
-rw-r--r--fs/ext4/xattr_trusted.c1
-rw-r--r--fs/ext4/xattr_user.c1
14 files changed, 42 insertions, 46 deletions
diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c
index 8efb2f0a3447..3f11656bd72e 100644
--- a/fs/ext4/block_validity.c
+++ b/fs/ext4/block_validity.c
@@ -13,7 +13,6 @@
13#include <linux/namei.h> 13#include <linux/namei.h>
14#include <linux/quotaops.h> 14#include <linux/quotaops.h>
15#include <linux/buffer_head.h> 15#include <linux/buffer_head.h>
16#include <linux/module.h>
17#include <linux/swap.h> 16#include <linux/swap.h>
18#include <linux/pagemap.h> 17#include <linux/pagemap.h>
19#include <linux/blkdev.h> 18#include <linux/blkdev.h>
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 5b0e26a1272d..1554b15f91bc 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1819,7 +1819,7 @@ extern int ext4fs_dirhash(const char *name, int len, struct
1819 dx_hash_info *hinfo); 1819 dx_hash_info *hinfo);
1820 1820
1821/* ialloc.c */ 1821/* ialloc.c */
1822extern struct inode *ext4_new_inode(handle_t *, struct inode *, int, 1822extern struct inode *ext4_new_inode(handle_t *, struct inode *, umode_t,
1823 const struct qstr *qstr, __u32 goal, 1823 const struct qstr *qstr, __u32 goal,
1824 uid_t *owner); 1824 uid_t *owner);
1825extern void ext4_free_inode(handle_t *, struct inode *); 1825extern void ext4_free_inode(handle_t *, struct inode *);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 607b1557d292..841faf5fb785 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -29,7 +29,6 @@
29 * - smart tree reduction 29 * - smart tree reduction
30 */ 30 */
31 31
32#include <linux/module.h>
33#include <linux/fs.h> 32#include <linux/fs.h>
34#include <linux/time.h> 33#include <linux/time.h>
35#include <linux/jbd2.h> 34#include <linux/jbd2.h>
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 00beb4f9cc4f..4637af036d9c 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -351,7 +351,7 @@ static void get_orlov_stats(struct super_block *sb, ext4_group_t g,
351 */ 351 */
352 352
353static int find_group_orlov(struct super_block *sb, struct inode *parent, 353static int find_group_orlov(struct super_block *sb, struct inode *parent,
354 ext4_group_t *group, int mode, 354 ext4_group_t *group, umode_t mode,
355 const struct qstr *qstr) 355 const struct qstr *qstr)
356{ 356{
357 ext4_group_t parent_group = EXT4_I(parent)->i_block_group; 357 ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
@@ -497,7 +497,7 @@ fallback_retry:
497} 497}
498 498
499static int find_group_other(struct super_block *sb, struct inode *parent, 499static int find_group_other(struct super_block *sb, struct inode *parent,
500 ext4_group_t *group, int mode) 500 ext4_group_t *group, umode_t mode)
501{ 501{
502 ext4_group_t parent_group = EXT4_I(parent)->i_block_group; 502 ext4_group_t parent_group = EXT4_I(parent)->i_block_group;
503 ext4_group_t i, last, ngroups = ext4_get_groups_count(sb); 503 ext4_group_t i, last, ngroups = ext4_get_groups_count(sb);
@@ -602,7 +602,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
602 */ 602 */
603static int ext4_claim_inode(struct super_block *sb, 603static int ext4_claim_inode(struct super_block *sb,
604 struct buffer_head *inode_bitmap_bh, 604 struct buffer_head *inode_bitmap_bh,
605 unsigned long ino, ext4_group_t group, int mode) 605 unsigned long ino, ext4_group_t group, umode_t mode)
606{ 606{
607 int free = 0, retval = 0, count; 607 int free = 0, retval = 0, count;
608 struct ext4_sb_info *sbi = EXT4_SB(sb); 608 struct ext4_sb_info *sbi = EXT4_SB(sb);
@@ -690,7 +690,7 @@ err_ret:
690 * For other inodes, search forward from the parent directory's block 690 * For other inodes, search forward from the parent directory's block
691 * group to find a free inode. 691 * group to find a free inode.
692 */ 692 */
693struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, 693struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, umode_t mode,
694 const struct qstr *qstr, __u32 goal, uid_t *owner) 694 const struct qstr *qstr, __u32 goal, uid_t *owner)
695{ 695{
696 struct super_block *sb; 696 struct super_block *sb;
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index 3cfc73fbca8e..830e1b2bf145 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -20,7 +20,6 @@
20 * (sct@redhat.com), 1993, 1998 20 * (sct@redhat.com), 1993, 1998
21 */ 21 */
22 22
23#include <linux/module.h>
24#include "ext4_jbd2.h" 23#include "ext4_jbd2.h"
25#include "truncate.h" 24#include "truncate.h"
26 25
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 92655fd89657..aa8efa6572d6 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -18,7 +18,6 @@
18 * Assorted race fixes, rewrite of ext4_get_block() by Al Viro, 2000 18 * Assorted race fixes, rewrite of ext4_get_block() by Al Viro, 2000
19 */ 19 */
20 20
21#include <linux/module.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
23#include <linux/time.h> 22#include <linux/time.h>
24#include <linux/jbd2.h> 23#include <linux/jbd2.h>
@@ -1881,7 +1880,7 @@ static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate);
1881 * a[0] = 'a'; 1880 * a[0] = 'a';
1882 * truncate(f, 4096); 1881 * truncate(f, 4096);
1883 * we have in the page first buffer_head mapped via page_mkwrite call back 1882 * we have in the page first buffer_head mapped via page_mkwrite call back
1884 * but other bufer_heads would be unmapped but dirty(dirty done via the 1883 * but other buffer_heads would be unmapped but dirty (dirty done via the
1885 * do_wp_page). So writepage should write the first block. If we modify 1884 * do_wp_page). So writepage should write the first block. If we modify
1886 * the mmap area beyond 1024 we will again get a page_fault and the 1885 * the mmap area beyond 1024 we will again get a page_fault and the
1887 * page_mkwrite callback will do the block allocation and mark the 1886 * page_mkwrite callback will do the block allocation and mark the
@@ -3469,7 +3468,7 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
3469 * transaction, and VFS/VM ensures that ext4_truncate() cannot run 3468 * transaction, and VFS/VM ensures that ext4_truncate() cannot run
3470 * simultaneously on behalf of the same inode. 3469 * simultaneously on behalf of the same inode.
3471 * 3470 *
3472 * As we work through the truncate and commmit bits of it to the journal there 3471 * As we work through the truncate and commit bits of it to the journal there
3473 * is one core, guiding principle: the file's tree must always be consistent on 3472 * is one core, guiding principle: the file's tree must always be consistent on
3474 * disk. We must be able to restart the truncate after a crash. 3473 * disk. We must be able to restart the truncate after a crash.
3475 * 3474 *
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index a56796814d6a..e87a932b073b 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -45,7 +45,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
45 if (get_user(flags, (int __user *) arg)) 45 if (get_user(flags, (int __user *) arg))
46 return -EFAULT; 46 return -EFAULT;
47 47
48 err = mnt_want_write(filp->f_path.mnt); 48 err = mnt_want_write_file(filp);
49 if (err) 49 if (err)
50 return err; 50 return err;
51 51
@@ -134,7 +134,7 @@ flags_err:
134 err = ext4_ext_migrate(inode); 134 err = ext4_ext_migrate(inode);
135flags_out: 135flags_out:
136 mutex_unlock(&inode->i_mutex); 136 mutex_unlock(&inode->i_mutex);
137 mnt_drop_write(filp->f_path.mnt); 137 mnt_drop_write_file(filp);
138 return err; 138 return err;
139 } 139 }
140 case EXT4_IOC_GETVERSION: 140 case EXT4_IOC_GETVERSION:
@@ -150,7 +150,7 @@ flags_out:
150 if (!inode_owner_or_capable(inode)) 150 if (!inode_owner_or_capable(inode))
151 return -EPERM; 151 return -EPERM;
152 152
153 err = mnt_want_write(filp->f_path.mnt); 153 err = mnt_want_write_file(filp);
154 if (err) 154 if (err)
155 return err; 155 return err;
156 if (get_user(generation, (int __user *) arg)) { 156 if (get_user(generation, (int __user *) arg)) {
@@ -158,10 +158,11 @@ flags_out:
158 goto setversion_out; 158 goto setversion_out;
159 } 159 }
160 160
161 mutex_lock(&inode->i_mutex);
161 handle = ext4_journal_start(inode, 1); 162 handle = ext4_journal_start(inode, 1);
162 if (IS_ERR(handle)) { 163 if (IS_ERR(handle)) {
163 err = PTR_ERR(handle); 164 err = PTR_ERR(handle);
164 goto setversion_out; 165 goto unlock_out;
165 } 166 }
166 err = ext4_reserve_inode_write(handle, inode, &iloc); 167 err = ext4_reserve_inode_write(handle, inode, &iloc);
167 if (err == 0) { 168 if (err == 0) {
@@ -170,8 +171,11 @@ flags_out:
170 err = ext4_mark_iloc_dirty(handle, inode, &iloc); 171 err = ext4_mark_iloc_dirty(handle, inode, &iloc);
171 } 172 }
172 ext4_journal_stop(handle); 173 ext4_journal_stop(handle);
174
175unlock_out:
176 mutex_unlock(&inode->i_mutex);
173setversion_out: 177setversion_out:
174 mnt_drop_write(filp->f_path.mnt); 178 mnt_drop_write_file(filp);
175 return err; 179 return err;
176 } 180 }
177 case EXT4_IOC_GROUP_EXTEND: { 181 case EXT4_IOC_GROUP_EXTEND: {
@@ -192,7 +196,7 @@ setversion_out:
192 return -EOPNOTSUPP; 196 return -EOPNOTSUPP;
193 } 197 }
194 198
195 err = mnt_want_write(filp->f_path.mnt); 199 err = mnt_want_write_file(filp);
196 if (err) 200 if (err)
197 return err; 201 return err;
198 202
@@ -204,7 +208,7 @@ setversion_out:
204 } 208 }
205 if (err == 0) 209 if (err == 0)
206 err = err2; 210 err = err2;
207 mnt_drop_write(filp->f_path.mnt); 211 mnt_drop_write_file(filp);
208 ext4_resize_end(sb); 212 ext4_resize_end(sb);
209 213
210 return err; 214 return err;
@@ -240,13 +244,13 @@ setversion_out:
240 return -EOPNOTSUPP; 244 return -EOPNOTSUPP;
241 } 245 }
242 246
243 err = mnt_want_write(filp->f_path.mnt); 247 err = mnt_want_write_file(filp);
244 if (err) 248 if (err)
245 goto mext_out; 249 goto mext_out;
246 250
247 err = ext4_move_extents(filp, donor_filp, me.orig_start, 251 err = ext4_move_extents(filp, donor_filp, me.orig_start,
248 me.donor_start, me.len, &me.moved_len); 252 me.donor_start, me.len, &me.moved_len);
249 mnt_drop_write(filp->f_path.mnt); 253 mnt_drop_write_file(filp);
250 if (me.moved_len > 0) 254 if (me.moved_len > 0)
251 file_remove_suid(donor_filp); 255 file_remove_suid(donor_filp);
252 256
@@ -277,7 +281,7 @@ mext_out:
277 return -EOPNOTSUPP; 281 return -EOPNOTSUPP;
278 } 282 }
279 283
280 err = mnt_want_write(filp->f_path.mnt); 284 err = mnt_want_write_file(filp);
281 if (err) 285 if (err)
282 return err; 286 return err;
283 287
@@ -289,7 +293,7 @@ mext_out:
289 } 293 }
290 if (err == 0) 294 if (err == 0)
291 err = err2; 295 err = err2;
292 mnt_drop_write(filp->f_path.mnt); 296 mnt_drop_write_file(filp);
293 ext4_resize_end(sb); 297 ext4_resize_end(sb);
294 298
295 return err; 299 return err;
@@ -301,7 +305,7 @@ mext_out:
301 if (!inode_owner_or_capable(inode)) 305 if (!inode_owner_or_capable(inode))
302 return -EACCES; 306 return -EACCES;
303 307
304 err = mnt_want_write(filp->f_path.mnt); 308 err = mnt_want_write_file(filp);
305 if (err) 309 if (err)
306 return err; 310 return err;
307 /* 311 /*
@@ -313,7 +317,7 @@ mext_out:
313 mutex_lock(&(inode->i_mutex)); 317 mutex_lock(&(inode->i_mutex));
314 err = ext4_ext_migrate(inode); 318 err = ext4_ext_migrate(inode);
315 mutex_unlock(&(inode->i_mutex)); 319 mutex_unlock(&(inode->i_mutex));
316 mnt_drop_write(filp->f_path.mnt); 320 mnt_drop_write_file(filp);
317 return err; 321 return err;
318 } 322 }
319 323
@@ -323,11 +327,11 @@ mext_out:
323 if (!inode_owner_or_capable(inode)) 327 if (!inode_owner_or_capable(inode))
324 return -EACCES; 328 return -EACCES;
325 329
326 err = mnt_want_write(filp->f_path.mnt); 330 err = mnt_want_write_file(filp);
327 if (err) 331 if (err)
328 return err; 332 return err;
329 err = ext4_alloc_da_blocks(inode); 333 err = ext4_alloc_da_blocks(inode);
330 mnt_drop_write(filp->f_path.mnt); 334 mnt_drop_write_file(filp);
331 return err; 335 return err;
332 } 336 }
333 337
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c
index 16ac228dbec6..e7d6bb0acfa6 100644
--- a/fs/ext4/migrate.c
+++ b/fs/ext4/migrate.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/module.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include "ext4_jbd2.h" 16#include "ext4_jbd2.h"
18 17
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index aa4c782c9dd7..2043f482375d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1736,7 +1736,7 @@ static int ext4_add_nondir(handle_t *handle,
1736 * If the create succeeds, we fill in the inode information 1736 * If the create succeeds, we fill in the inode information
1737 * with d_instantiate(). 1737 * with d_instantiate().
1738 */ 1738 */
1739static int ext4_create(struct inode *dir, struct dentry *dentry, int mode, 1739static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode,
1740 struct nameidata *nd) 1740 struct nameidata *nd)
1741{ 1741{
1742 handle_t *handle; 1742 handle_t *handle;
@@ -1770,7 +1770,7 @@ retry:
1770} 1770}
1771 1771
1772static int ext4_mknod(struct inode *dir, struct dentry *dentry, 1772static int ext4_mknod(struct inode *dir, struct dentry *dentry,
1773 int mode, dev_t rdev) 1773 umode_t mode, dev_t rdev)
1774{ 1774{
1775 handle_t *handle; 1775 handle_t *handle;
1776 struct inode *inode; 1776 struct inode *inode;
@@ -1806,7 +1806,7 @@ retry:
1806 return err; 1806 return err;
1807} 1807}
1808 1808
1809static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode) 1809static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
1810{ 1810{
1811 handle_t *handle; 1811 handle_t *handle;
1812 struct inode *inode; 1812 struct inode *inode;
@@ -2315,7 +2315,7 @@ retry:
2315 err = PTR_ERR(handle); 2315 err = PTR_ERR(handle);
2316 goto err_drop_inode; 2316 goto err_drop_inode;
2317 } 2317 }
2318 inc_nlink(inode); 2318 set_nlink(inode, 1);
2319 err = ext4_orphan_del(handle, inode); 2319 err = ext4_orphan_del(handle, inode);
2320 if (err) { 2320 if (err) {
2321 ext4_journal_stop(handle); 2321 ext4_journal_stop(handle);
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 7e106c810c62..475851896518 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -6,7 +6,6 @@
6 * Written by Theodore Ts'o, 2010. 6 * Written by Theodore Ts'o, 2010.
7 */ 7 */
8 8
9#include <linux/module.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
11#include <linux/time.h> 10#include <linux/time.h>
12#include <linux/jbd2.h> 11#include <linux/jbd2.h>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3e1329e2f826..ed3ce82e2de4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -930,7 +930,6 @@ static int ext4_drop_inode(struct inode *inode)
930static void ext4_i_callback(struct rcu_head *head) 930static void ext4_i_callback(struct rcu_head *head)
931{ 931{
932 struct inode *inode = container_of(head, struct inode, i_rcu); 932 struct inode *inode = container_of(head, struct inode, i_rcu);
933 INIT_LIST_HEAD(&inode->i_dentry);
934 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); 933 kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
935} 934}
936 935
@@ -1033,11 +1032,11 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
1033 * - it's set to a non-default value OR 1032 * - it's set to a non-default value OR
1034 * - if the per-sb default is different from the global default 1033 * - if the per-sb default is different from the global default
1035 */ 1034 */
1036static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs) 1035static int ext4_show_options(struct seq_file *seq, struct dentry *root)
1037{ 1036{
1038 int def_errors; 1037 int def_errors;
1039 unsigned long def_mount_opts; 1038 unsigned long def_mount_opts;
1040 struct super_block *sb = vfs->mnt_sb; 1039 struct super_block *sb = root->d_sb;
1041 struct ext4_sb_info *sbi = EXT4_SB(sb); 1040 struct ext4_sb_info *sbi = EXT4_SB(sb);
1042 struct ext4_super_block *es = sbi->s_es; 1041 struct ext4_super_block *es = sbi->s_es;
1043 1042
@@ -2883,8 +2882,7 @@ cont_thread:
2883 } 2882 }
2884 mutex_unlock(&eli->li_list_mtx); 2883 mutex_unlock(&eli->li_list_mtx);
2885 2884
2886 if (freezing(current)) 2885 try_to_freeze();
2887 refrigerator();
2888 2886
2889 cur = jiffies; 2887 cur = jiffies;
2890 if ((time_after_eq(cur, next_wakeup)) || 2888 if ((time_after_eq(cur, next_wakeup)) ||
@@ -3735,10 +3733,12 @@ no_journal:
3735 } 3733 }
3736 if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) { 3734 if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
3737 ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck"); 3735 ext4_msg(sb, KERN_ERR, "corrupt root inode, run e2fsck");
3736 iput(root);
3738 goto failed_mount4; 3737 goto failed_mount4;
3739 } 3738 }
3740 sb->s_root = d_alloc_root(root); 3739 sb->s_root = d_alloc_root(root);
3741 if (!sb->s_root) { 3740 if (!sb->s_root) {
3741 iput(root);
3742 ext4_msg(sb, KERN_ERR, "get root dentry failed"); 3742 ext4_msg(sb, KERN_ERR, "get root dentry failed");
3743 ret = -ENOMEM; 3743 ret = -ENOMEM;
3744 goto failed_mount4; 3744 goto failed_mount4;
@@ -3775,7 +3775,7 @@ no_journal:
3775 if (err) { 3775 if (err) {
3776 ext4_msg(sb, KERN_ERR, "failed to initialize system " 3776 ext4_msg(sb, KERN_ERR, "failed to initialize system "
3777 "zone (%d)", err); 3777 "zone (%d)", err);
3778 goto failed_mount4; 3778 goto failed_mount4a;
3779 } 3779 }
3780 3780
3781 ext4_ext_init(sb); 3781 ext4_ext_init(sb);
@@ -3832,13 +3832,14 @@ cantfind_ext4:
3832failed_mount7: 3832failed_mount7:
3833 ext4_unregister_li_request(sb); 3833 ext4_unregister_li_request(sb);
3834failed_mount6: 3834failed_mount6:
3835 ext4_ext_release(sb);
3836failed_mount5:
3837 ext4_mb_release(sb); 3835 ext4_mb_release(sb);
3836failed_mount5:
3837 ext4_ext_release(sb);
3838 ext4_release_system_zone(sb); 3838 ext4_release_system_zone(sb);
3839failed_mount4: 3839failed_mount4a:
3840 iput(root); 3840 dput(sb->s_root);
3841 sb->s_root = NULL; 3841 sb->s_root = NULL;
3842failed_mount4:
3842 ext4_msg(sb, KERN_ERR, "mount failed"); 3843 ext4_msg(sb, KERN_ERR, "mount failed");
3843 destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq); 3844 destroy_workqueue(EXT4_SB(sb)->dio_unwritten_wq);
3844failed_mount_wq: 3845failed_mount_wq:
@@ -4782,7 +4783,7 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
4782 return -EINVAL; 4783 return -EINVAL;
4783 4784
4784 /* Quotafile not on the same filesystem? */ 4785 /* Quotafile not on the same filesystem? */
4785 if (path->mnt->mnt_sb != sb) 4786 if (path->dentry->d_sb != sb)
4786 return -EXDEV; 4787 return -EXDEV;
4787 /* Journaling quota? */ 4788 /* Journaling quota? */
4788 if (EXT4_SB(sb)->s_qf_names[type]) { 4789 if (EXT4_SB(sb)->s_qf_names[type]) {
diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c
index 34e4350dd4d9..b60f9f81e33c 100644
--- a/fs/ext4/xattr_security.c
+++ b/fs/ext4/xattr_security.c
@@ -3,7 +3,6 @@
3 * Handler for storing security labels as extended attributes. 3 * Handler for storing security labels as extended attributes.
4 */ 4 */
5 5
6#include <linux/module.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/fs.h> 7#include <linux/fs.h>
9#include <linux/security.h> 8#include <linux/security.h>
diff --git a/fs/ext4/xattr_trusted.c b/fs/ext4/xattr_trusted.c
index 37e6ebca2cc3..95f1f4ab59a4 100644
--- a/fs/ext4/xattr_trusted.c
+++ b/fs/ext4/xattr_trusted.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2003 by Andreas Gruenbacher, <a.gruenbacher@computer.org> 5 * Copyright (C) 2003 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
6 */ 6 */
7 7
8#include <linux/module.h>
9#include <linux/string.h> 8#include <linux/string.h>
10#include <linux/capability.h> 9#include <linux/capability.h>
11#include <linux/fs.h> 10#include <linux/fs.h>
diff --git a/fs/ext4/xattr_user.c b/fs/ext4/xattr_user.c
index 98c375352d0e..0edb7611ffbe 100644
--- a/fs/ext4/xattr_user.c
+++ b/fs/ext4/xattr_user.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org> 5 * Copyright (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
6 */ 6 */
7 7
8#include <linux/module.h>
9#include <linux/string.h> 8#include <linux/string.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
11#include "ext4_jbd2.h" 10#include "ext4_jbd2.h"