Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -674,6 +674,10 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
		goto fail_gunlock;

	inode = new_inode(sdp->sd_vfs);
	if (!inode) {
		gfs2_glock_dq_uninit(ghs);
		return -ENOMEM;
	}
	ip = GFS2_I(inode);
	error = gfs2_rs_alloc(ip);
	if (error)