]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.1/ext2-ext3-ext4-don-t-inherit-append_fl-or-immutable_fl-for-new-inodes.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / ext2-ext3-ext4-don-t-inherit-append_fl-or-immutable_fl-for-new-inodes.patch
1 From 1cd9f0976aa4606db8d6e3dc3edd0aca8019372a Mon Sep 17 00:00:00 2001
2 From: Theodore Ts'o <tytso@mit.edu>
3 Date: Wed, 31 Aug 2011 11:54:51 -0400
4 Subject: ext2,ext3,ext4: don't inherit APPEND_FL or IMMUTABLE_FL for new inodes
5
6 From: Theodore Ts'o <tytso@mit.edu>
7
8 commit 1cd9f0976aa4606db8d6e3dc3edd0aca8019372a upstream.
9
10 This doesn't make much sense, and it exposes a bug in the kernel where
11 attempts to create a new file in an append-only directory using
12 O_CREAT will fail (but still leave a zero-length file). This was
13 discovered when xfstests #79 was generalized so it could run on all
14 file systems.
15
16 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18
19 ---
20 fs/ext4/ext4.h | 3 +--
21 include/linux/ext2_fs.h | 4 ++--
22 include/linux/ext3_fs.h | 4 ++--
23 3 files changed, 5 insertions(+), 6 deletions(-)
24
25 --- a/fs/ext4/ext4.h
26 +++ b/fs/ext4/ext4.h
27 @@ -358,8 +358,7 @@ struct flex_groups {
28
29 /* Flags that should be inherited by new inodes from their parent. */
30 #define EXT4_FL_INHERITED (EXT4_SECRM_FL | EXT4_UNRM_FL | EXT4_COMPR_FL |\
31 - EXT4_SYNC_FL | EXT4_IMMUTABLE_FL | EXT4_APPEND_FL |\
32 - EXT4_NODUMP_FL | EXT4_NOATIME_FL |\
33 + EXT4_SYNC_FL | EXT4_NODUMP_FL | EXT4_NOATIME_FL |\
34 EXT4_NOCOMPR_FL | EXT4_JOURNAL_DATA_FL |\
35 EXT4_NOTAIL_FL | EXT4_DIRSYNC_FL)
36
37 --- a/include/linux/ext2_fs.h
38 +++ b/include/linux/ext2_fs.h
39 @@ -197,8 +197,8 @@ struct ext2_group_desc
40
41 /* Flags that should be inherited by new inodes from their parent. */
42 #define EXT2_FL_INHERITED (EXT2_SECRM_FL | EXT2_UNRM_FL | EXT2_COMPR_FL |\
43 - EXT2_SYNC_FL | EXT2_IMMUTABLE_FL | EXT2_APPEND_FL |\
44 - EXT2_NODUMP_FL | EXT2_NOATIME_FL | EXT2_COMPRBLK_FL|\
45 + EXT2_SYNC_FL | EXT2_NODUMP_FL |\
46 + EXT2_NOATIME_FL | EXT2_COMPRBLK_FL |\
47 EXT2_NOCOMP_FL | EXT2_JOURNAL_DATA_FL |\
48 EXT2_NOTAIL_FL | EXT2_DIRSYNC_FL)
49
50 --- a/include/linux/ext3_fs.h
51 +++ b/include/linux/ext3_fs.h
52 @@ -180,8 +180,8 @@ struct ext3_group_desc
53
54 /* Flags that should be inherited by new inodes from their parent. */
55 #define EXT3_FL_INHERITED (EXT3_SECRM_FL | EXT3_UNRM_FL | EXT3_COMPR_FL |\
56 - EXT3_SYNC_FL | EXT3_IMMUTABLE_FL | EXT3_APPEND_FL |\
57 - EXT3_NODUMP_FL | EXT3_NOATIME_FL | EXT3_COMPRBLK_FL|\
58 + EXT3_SYNC_FL | EXT3_NODUMP_FL |\
59 + EXT3_NOATIME_FL | EXT3_COMPRBLK_FL |\
60 EXT3_NOCOMPR_FL | EXT3_JOURNAL_DATA_FL |\
61 EXT3_NOTAIL_FL | EXT3_DIRSYNC_FL)
62