Skip to content

Commit

Permalink
jfs: Remove jfs_get_inode_flags()
Browse files Browse the repository at this point in the history
Now that all places setting inode->i_flags that should be reflected in
on-disk flags are gone, we can remove jfs_get_inode_flags() call.

Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Apr 19, 2017
1 parent 420768d commit 7ba4a2e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions fs/jfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)

switch (cmd) {
case JFS_IOC_GETFLAGS:
jfs_get_inode_flags(jfs_inode);
flags = jfs_inode->mode2 & JFS_FL_USER_VISIBLE;
flags = jfs_map_ext2(flags, 0);
return put_user(flags, (int __user *) arg);
Expand Down Expand Up @@ -98,7 +97,6 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
/* Lock against other parallel changes of flags */
inode_lock(inode);

jfs_get_inode_flags(jfs_inode);
oldflags = jfs_inode->mode2;

/*
Expand Down
1 change: 0 additions & 1 deletion fs/jfs/jfs_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3148,7 +3148,6 @@ static void copy_to_dinode(struct dinode * dip, struct inode *ip)
else
dip->di_gid = cpu_to_le32(from_kgid(&init_user_ns,
jfs_ip->saved_gid));
jfs_get_inode_flags(jfs_ip);
/*
* mode2 is only needed for storing the higher order bits.
* Trust i_mode for the lower order ones
Expand Down
18 changes: 0 additions & 18 deletions fs/jfs/jfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,6 @@ void jfs_set_inode_flags(struct inode *inode)
S_DIRSYNC | S_SYNC);
}

void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)
{
unsigned int flags = jfs_ip->vfs_inode.i_flags;

jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_APPEND_FL | JFS_NOATIME_FL |
JFS_DIRSYNC_FL | JFS_SYNC_FL);
if (flags & S_IMMUTABLE)
jfs_ip->mode2 |= JFS_IMMUTABLE_FL;
if (flags & S_APPEND)
jfs_ip->mode2 |= JFS_APPEND_FL;
if (flags & S_NOATIME)
jfs_ip->mode2 |= JFS_NOATIME_FL;
if (flags & S_DIRSYNC)
jfs_ip->mode2 |= JFS_DIRSYNC_FL;
if (flags & S_SYNC)
jfs_ip->mode2 |= JFS_SYNC_FL;
}

/*
* NAME: ialloc()
*
Expand Down
1 change: 0 additions & 1 deletion fs/jfs/jfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extern void jfs_truncate(struct inode *);
extern void jfs_truncate_nolock(struct inode *, loff_t);
extern void jfs_free_zero_link(struct inode *);
extern struct dentry *jfs_get_parent(struct dentry *dentry);
extern void jfs_get_inode_flags(struct jfs_inode_info *);
extern struct dentry *jfs_fh_to_dentry(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type);
extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
Expand Down

0 comments on commit 7ba4a2e

Please sign in to comment.