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

Commit 80f4781d authored by Abhi Das's avatar Abhi Das Committed by Bob Peterson
Browse files

gfs2: use inode_lock/unlock instead of accessing i_mutex directly



i_mutex has been replaced by i_rwsem and directly accessing the
non-existent i_mutex breaks the kernel build.

Signed-off-by: default avatarAbhi Das <adas@redhat.com>
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
parent 9c7fe835
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -960,16 +960,16 @@ static ssize_t gfs2_file_splice_read(struct file *in, loff_t *ppos,
	struct gfs2_holder gh;
	int ret;

	mutex_lock(&inode->i_mutex);
	inode_lock(inode);

	ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
	if (ret) {
		mutex_unlock(&inode->i_mutex);
		inode_unlock(inode);
		return ret;
	}

	gfs2_glock_dq_uninit(&gh);
	mutex_unlock(&inode->i_mutex);
	inode_unlock(inode);

	return generic_file_splice_read(in, ppos, pipe, len, flags);
}