kernel/fs/jfs/namei.c
.. .. @@ -798,6 +798,11 @@ 798 798 if (rc) 799 799 goto out; 800 800 801 + if (isReadOnly(ip)) {802 + jfs_error(ip->i_sb, "read-only filesystem\n");803 + return -EROFS;804 + }805 +801 806 tid = txBegin(ip->i_sb, 0); 802 807 803 808 mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT);