Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

Jan Kara 420768d3 38eae95d

-22
-1
fs/ext2/ext2.h
··· 779 779 extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int); 780 780 extern int ext2_setattr (struct dentry *, struct iattr *); 781 781 extern void ext2_set_inode_flags(struct inode *inode); 782 - extern void ext2_get_inode_flags(struct ext2_inode_info *); 783 782 extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, 784 783 u64 start, u64 len); 785 784
-20
fs/ext2/inode.c
··· 1384 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 1387 struct inode *ext2_iget (struct super_block *sb, unsigned long ino) 1407 1388 { 1408 1389 struct ext2_inode_info *ei; ··· 1544 1563 if (ei->i_state & EXT2_STATE_NEW) 1545 1564 memset(raw_inode, 0, EXT2_SB(sb)->s_inode_size); 1546 1565 1547 - ext2_get_inode_flags(ei); 1548 1566 raw_inode->i_mode = cpu_to_le16(inode->i_mode); 1549 1567 if (!(test_opt(sb, NO_UID32))) { 1550 1568 raw_inode->i_uid_low = cpu_to_le16(low_16_bits(uid));
-1
fs/ext2/ioctl.c
··· 29 29 30 30 switch (cmd) { 31 31 case EXT2_IOC_GETFLAGS: 32 - ext2_get_inode_flags(ei); 33 32 flags = ei->i_flags & EXT2_FL_USER_VISIBLE; 34 33 return put_user(flags, (int __user *) arg); 35 34 case EXT2_IOC_SETFLAGS: {