gfs2: use inode_lock/unlock instead of accessing i_mutex directly
authorAbhi Das <adas@redhat.com>
Mon, 2 May 2016 12:07:01 +0000 (07:07 -0500)
committerBob Peterson <rpeterso@redhat.com>
Mon, 2 May 2016 12:07:01 +0000 (07:07 -0500)
i_mutex has been replaced by i_rwsem and directly accessing the
non-existent i_mutex breaks the kernel build.

Signed-off-by: Abhi Das <adas@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/file.c

index f33fd92e5f49fc40917b4e9248d7b75aa476bf25..374dd532710137ad9225858ecf1c4f8456200caf 100644 (file)
@@ -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);
 }
This page took 0.025454 seconds and 5 git commands to generate.