mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
gfs2: use the new ->i_state accessors
Change generated with coccinelle and fixed up by hand as appropriate. Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
ba69118c52
commit
40a4c512ad
@@ -744,7 +744,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
|
||||
{
|
||||
struct address_space *mapping = file->f_mapping;
|
||||
struct inode *inode = mapping->host;
|
||||
int sync_state = inode->i_state & I_DIRTY;
|
||||
int sync_state = inode_state_read_once(inode) & I_DIRTY;
|
||||
struct gfs2_inode *ip = GFS2_I(inode);
|
||||
int ret = 0, ret1 = 0;
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
|
||||
u16 height, depth;
|
||||
umode_t mode = be32_to_cpu(str->di_mode);
|
||||
struct inode *inode = &ip->i_inode;
|
||||
bool is_new = inode->i_state & I_NEW;
|
||||
bool is_new = inode_state_read_once(inode) & I_NEW;
|
||||
|
||||
if (unlikely(ip->i_no_addr != be64_to_cpu(str->di_num.no_addr))) {
|
||||
gfs2_consist_inode(ip);
|
||||
|
||||
@@ -127,7 +127,7 @@ struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned int type,
|
||||
|
||||
ip = GFS2_I(inode);
|
||||
|
||||
if (inode->i_state & I_NEW) {
|
||||
if (inode_state_read_once(inode) & I_NEW) {
|
||||
struct gfs2_sbd *sdp = GFS2_SB(inode);
|
||||
struct gfs2_glock *io_gl;
|
||||
int extra_flags = 0;
|
||||
@@ -924,7 +924,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
|
||||
gfs2_dir_no_add(&da);
|
||||
gfs2_glock_dq_uninit(&d_gh);
|
||||
if (!IS_ERR_OR_NULL(inode)) {
|
||||
if (inode->i_state & I_NEW)
|
||||
if (inode_state_read_once(inode) & I_NEW)
|
||||
iget_failed(inode);
|
||||
else
|
||||
iput(inode);
|
||||
|
||||
@@ -1751,7 +1751,7 @@ static void gfs2_evict_inodes(struct super_block *sb)
|
||||
spin_lock(&sb->s_inode_list_lock);
|
||||
list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
|
||||
spin_lock(&inode->i_lock);
|
||||
if ((inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) &&
|
||||
if ((inode_state_read(inode) & (I_FREEING | I_WILL_FREE | I_NEW)) &&
|
||||
!need_resched()) {
|
||||
spin_unlock(&inode->i_lock);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user