From: Jan Kara <jack@suse.cz>
To: <linux-fsdevel@vger.kernel.org>
Cc: <linux-ext4@vger.kernel.org>, <reiserfs-devel@vger.kernel.org>,
jfs-discussion@lists.sourceforge.net, Jan Kara <jack@suse.cz>
Subject: [PATCH 07/11] ext2: Remove ext2_get_inode_flags()
Date: Wed, 12 Apr 2017 09:26:07 +0200 [thread overview]
Message-ID: <20170412072611.29017-8-jack@suse.cz> (raw)
In-Reply-To: <20170412072611.29017-1-jack@suse.cz>
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.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/ext2/ext2.h | 1 -
fs/ext2/inode.c | 20 --------------------
fs/ext2/ioctl.c | 1 -
3 files changed, 22 deletions(-)
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index 5e64de9c5093..c7cfe9afa375 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -779,7 +779,6 @@ extern void ext2_evict_inode(struct inode *);
extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int);
extern int ext2_setattr (struct dentry *, struct iattr *);
extern void ext2_set_inode_flags(struct inode *inode);
-extern void ext2_get_inode_flags(struct ext2_inode_info *);
extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
u64 start, u64 len);
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 128cce540645..1e2663fbbc54 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1384,25 +1384,6 @@ void ext2_set_inode_flags(struct inode *inode)
inode->i_flags |= S_DAX;
}
-/* Propagate flags from i_flags to EXT2_I(inode)->i_flags */
-void ext2_get_inode_flags(struct ext2_inode_info *ei)
-{
- unsigned int flags = ei->vfs_inode.i_flags;
-
- ei->i_flags &= ~(EXT2_SYNC_FL|EXT2_APPEND_FL|
- EXT2_IMMUTABLE_FL|EXT2_NOATIME_FL|EXT2_DIRSYNC_FL);
- if (flags & S_SYNC)
- ei->i_flags |= EXT2_SYNC_FL;
- if (flags & S_APPEND)
- ei->i_flags |= EXT2_APPEND_FL;
- if (flags & S_IMMUTABLE)
- ei->i_flags |= EXT2_IMMUTABLE_FL;
- if (flags & S_NOATIME)
- ei->i_flags |= EXT2_NOATIME_FL;
- if (flags & S_DIRSYNC)
- ei->i_flags |= EXT2_DIRSYNC_FL;
-}
-
struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
{
struct ext2_inode_info *ei;
@@ -1563,7 +1544,6 @@ static int __ext2_write_inode(struct inode *inode, int do_sync)
if (ei->i_state & EXT2_STATE_NEW)
memset(raw_inode, 0, EXT2_SB(sb)->s_inode_size);
- ext2_get_inode_flags(ei);
raw_inode->i_mode = cpu_to_le16(inode->i_mode);
if (!(test_opt(sb, NO_UID32))) {
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)
switch (cmd) {
case EXT2_IOC_GETFLAGS:
- ext2_get_inode_flags(ei);
flags = ei->i_flags & EXT2_FL_USER_VISIBLE;
return put_user(flags, (int __user *) arg);
case EXT2_IOC_SETFLAGS: {
--
2.12.0
next prev parent reply other threads:[~2017-04-12 7:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-12 7:26 [PATCH 0/11] quota: Stop setting IMMUTABLE and NOATIME flags directly Jan Kara
2017-04-12 7:26 ` [PATCH 01/11] ext4: Set flags on quota files directly Jan Kara
2017-04-12 21:00 ` Andreas Dilger
2017-04-13 8:01 ` Jan Kara
2017-04-12 7:26 ` [PATCH 02/11] reiserfs: " Jan Kara
2017-04-12 7:26 ` [PATCH 03/11] ext2: " Jan Kara
2017-04-12 7:26 ` [PATCH 04/11] jfs: " Jan Kara
2017-04-12 7:26 ` [PATCH 05/11] quota: Stop setting IMMUTABLE and NOATIME flags on quota files Jan Kara
2017-04-13 4:04 ` Andreas Dilger
2017-04-12 7:26 ` [PATCH 06/11] ext4: Remove ext4_get_inode_flags() Jan Kara
2017-04-13 4:05 ` Andreas Dilger
2017-04-12 7:26 ` Jan Kara [this message]
2017-04-13 4:05 ` [PATCH 07/11] ext2: Remove ext2_get_inode_flags() Andreas Dilger
2017-04-12 7:26 ` [PATCH 08/11] jfs: Remove jfs_get_inode_flags() Jan Kara
2017-04-12 7:26 ` [PATCH 09/11] reiserfs: Remove useless setting of i_flags Jan Kara
2017-04-12 7:26 ` [PATCH 10/11] reiserfs: Remove i_attrs_to_sd_attrs() Jan Kara
2017-04-12 7:26 ` [PATCH 11/11] quota: Remove dquot_quotactl_ops Jan Kara
2017-04-15 3:22 ` Can the patch set [1] be put up on openSUSE Build Service as well please ? doiggl
2017-04-18 9:18 ` Jan Kara
2017-04-19 10:34 ` [PATCH 0/11] quota: Stop setting IMMUTABLE and NOATIME flags directly Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170412072611.29017-8-jack@suse.cz \
--to=jack@suse.cz \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=reiserfs-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).