diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 60c4a0e0fca5..25b303276b82 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c @@ -97,6 +97,10 @@ static int jfs_create(struct mnt_idmap *idmap, struct inode *dip, } tid = txBegin(dip->i_sb, 0); + if (tid == 0) { + jfs_err("jfs_create: unable to create tblk due to read only filesystem"); + return -EROFS; + } mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD);