Skip to contentSkip to conversation

gfs2: use inode_lock/unlock instead of accessing i_mutex directly

PATCH New Abhi Das 2 participants 2 messages May 2, 2016 GFS2 file system

lore
Share & tools
lore

Abhi Das

author
#0 lore raw

PATCH 1/1 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.

CC Stephen Rothwell <[email protected]>
CC Al Viro <[email protected]>
---
 fs/gfs2/file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/gfs2/file.c +3 -3
index f33fd92..374dd53 100644
@@ -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);
 }
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 gfs2: use inode_lock/unlock instead of accessing i_mutex directly

----- Original Message -----

Quoted 7 lines

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

CC Stephen Rothwell <[email protected]>
CC Al Viro <[email protected]>

---

Hi Abhi,

Thanks. This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=80f4781d2c0ba63bf9ab4de90a6829a1368b80a3

Regards,

Bob Peterson
Red Hat File Systems