Commit be4f245d authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse

GFS2: add error check while allocating new inodes

This patch adds a return code check after attempting to allocate
a new inode during dinode creation.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent b7804161
...@@ -674,6 +674,10 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, ...@@ -674,6 +674,10 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
goto fail_gunlock; goto fail_gunlock;
inode = new_inode(sdp->sd_vfs); inode = new_inode(sdp->sd_vfs);
if (!inode) {
gfs2_glock_dq_uninit(ghs);
return -ENOMEM;
}
ip = GFS2_I(inode); ip = GFS2_I(inode);
error = gfs2_rs_alloc(ip); error = gfs2_rs_alloc(ip);
if (error) if (error)
......
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