diff options
author | Jan Kara <jack@suse.cz> | 2017-04-11 10:33:50 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-19 08:21:23 -0400 |
commit | 420768d31960fd4398d4553e79cab8af3db2e9ee (patch) | |
tree | c43cb6b66b391124fa0d355d87d1ccd621a778a4 | |
parent | 38eae95ddc1964b42fc6d313a1bd17c43e3d08f1 (diff) |
ext2: Remove ext2_get_inode_flags()
Now that all places setting inode->i_flags that should be reflected in
on-disk flags are gone, we can remove ext2_get_inode_flags() call.
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/ext2/ext2.h | 1 | ||||
-rw-r--r-- | fs/ext2/inode.c | 20 | ||||
-rw-r--r-- | fs/ext2/ioctl.c | 1 |
3 files changed, 0 insertions, 22 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h index dca3604b9970..03f5ce1d3dbe 100644 --- a/fs/ext2/ext2.h +++ b/fs/ext2/ext2.h | |||
@@ -779,7 +779,6 @@ extern void ext2_evict_inode(struct inode *); | |||
779 | extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int); | 779 | extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int); |
780 | extern int ext2_setattr (struct dentry *, struct iattr *); | 780 | extern int ext2_setattr (struct dentry *, struct iattr *); |
781 | extern void ext2_set_inode_flags(struct inode *inode); | 781 | extern void ext2_set_inode_flags(struct inode *inode); |
782 | extern void ext2_get_inode_flags(struct ext2_inode_info *); | ||
783 | extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | 782 | extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, |
784 | u64 start, u64 len); | 783 | u64 start, u64 len); |
785 | 784 | ||
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 4d3e2528ac17..3a38c1b84e3c 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -1384,25 +1384,6 @@ void ext2_set_inode_flags(struct inode *inode) | |||
1384 | inode->i_flags |= S_DAX; | 1384 | inode->i_flags |= S_DAX; |
1385 | } | 1385 | } |
1386 | 1386 | ||
1387 | /* Propagate flags from i_flags to EXT2_I(inode)->i_flags */ | ||
1388 | void ext2_get_inode_flags(struct ext2_inode_info *ei) | ||
1389 | { | ||
1390 | unsigned int flags = ei->vfs_inode.i_flags; | ||
1391 | |||
1392 | ei->i_flags &= ~(EXT2_SYNC_FL|EXT2_APPEND_FL| | ||
1393 | EXT2_IMMUTABLE_FL|EXT2_NOATIME_FL|EXT2_DIRSYNC_FL); | ||
1394 | if (flags & S_SYNC) | ||
1395 | ei->i_flags |= EXT2_SYNC_FL; | ||
1396 | if (flags & S_APPEND) | ||
1397 | ei->i_flags |= EXT2_APPEND_FL; | ||
1398 | if (flags & S_IMMUTABLE) | ||
1399 | ei->i_flags |= EXT2_IMMUTABLE_FL; | ||
1400 | if (flags & S_NOATIME) | ||
1401 | ei->i_flags |= EXT2_NOATIME_FL; | ||
1402 | if (flags & S_DIRSYNC) | ||
1403 | ei->i_flags |= EXT2_DIRSYNC_FL; | ||
1404 | } | ||
1405 | |||
1406 | struct inode *ext2_iget (struct super_block *sb, unsigned long ino) | 1387 | struct inode *ext2_iget (struct super_block *sb, unsigned long ino) |
1407 | { | 1388 | { |
1408 | struct ext2_inode_info *ei; | 1389 | struct ext2_inode_info *ei; |
@@ -1563,7 +1544,6 @@ static int __ext2_write_inode(struct inode *inode, int do_sync) | |||
1563 | if (ei->i_state & EXT2_STATE_NEW) | 1544 | if (ei->i_state & EXT2_STATE_NEW) |
1564 | memset(raw_inode, 0, EXT2_SB(sb)->s_inode_size); | 1545 | memset(raw_inode, 0, EXT2_SB(sb)->s_inode_size); |
1565 | 1546 | ||
1566 | ext2_get_inode_flags(ei); | ||
1567 | raw_inode->i_mode = cpu_to_le16(inode->i_mode); | 1547 | raw_inode->i_mode = cpu_to_le16(inode->i_mode); |
1568 | if (!(test_opt(sb, NO_UID32))) { | 1548 | if (!(test_opt(sb, NO_UID32))) { |
1569 | raw_inode->i_uid_low = cpu_to_le16(low_16_bits(uid)); | 1549 | raw_inode->i_uid_low = cpu_to_le16(low_16_bits(uid)); |
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index 191e02b28ce8..087f122cca42 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c | |||
@@ -29,7 +29,6 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
29 | 29 | ||
30 | switch (cmd) { | 30 | switch (cmd) { |
31 | case EXT2_IOC_GETFLAGS: | 31 | case EXT2_IOC_GETFLAGS: |
32 | ext2_get_inode_flags(ei); | ||
33 | flags = ei->i_flags & EXT2_FL_USER_VISIBLE; | 32 | flags = ei->i_flags & EXT2_FL_USER_VISIBLE; |
34 | return put_user(flags, (int __user *) arg); | 33 | return put_user(flags, (int __user *) arg); |
35 | case EXT2_IOC_SETFLAGS: { | 34 | case EXT2_IOC_SETFLAGS: { |