diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-11-02 18:34:42 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-12-02 15:58:00 +0100 |
commit | 3d0258bc11185ccb21f922332eca731e1928c5a4 (patch) | |
tree | f4c6adc183c71c9f83e206d17350073ebc7d405a /fs/gfs2 | |
parent | 761fdbbce96fb3d0569f50a77b1214dbc4b17c44 (diff) |
gfs2: Clean up initialization of "ip" in gfs2_create_inode
Initialize variable "ip" earlier so that it can be used interchangeably
with "inode" everywhere.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 465f1673101f..b91f15abe24e 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -659,12 +659,12 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, error = -ENOMEM; if (!inode) goto fail_gunlock; + ip = GFS2_I(inode); error = posix_acl_create(dir, &mode, &default_acl, &acl); if (error) goto fail_gunlock; - ip = GFS2_I(inode); error = gfs2_qa_get(ip); if (error) goto fail_free_acls; @@ -821,7 +821,7 @@ fail_gunlock: if (!free_vfs_inode) mark_inode_dirty(inode); set_bit(free_vfs_inode ? GIF_FREE_VFS_INODE : GIF_ALLOC_FAILED, - &GFS2_I(inode)->i_flags); + &ip->i_flags); if (inode->i_state & I_NEW) iget_failed(inode); else |