Commit 3d0258bc authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

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: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 761fdbbc
...@@ -659,12 +659,12 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, ...@@ -659,12 +659,12 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
error = -ENOMEM; error = -ENOMEM;
if (!inode) if (!inode)
goto fail_gunlock; goto fail_gunlock;
ip = GFS2_I(inode);
error = posix_acl_create(dir, &mode, &default_acl, &acl); error = posix_acl_create(dir, &mode, &default_acl, &acl);
if (error) if (error)
goto fail_gunlock; goto fail_gunlock;
ip = GFS2_I(inode);
error = gfs2_qa_get(ip); error = gfs2_qa_get(ip);
if (error) if (error)
goto fail_free_acls; goto fail_free_acls;
...@@ -821,7 +821,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, ...@@ -821,7 +821,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
if (!free_vfs_inode) if (!free_vfs_inode)
mark_inode_dirty(inode); mark_inode_dirty(inode);
set_bit(free_vfs_inode ? GIF_FREE_VFS_INODE : GIF_ALLOC_FAILED, 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) if (inode->i_state & I_NEW)
iget_failed(inode); iget_failed(inode);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment