hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/fs/jfs/namei.c
....@@ -798,6 +798,11 @@
798798 if (rc)
799799 goto out;
800800
801
+ if (isReadOnly(ip)) {
802
+ jfs_error(ip->i_sb, "read-only filesystem\n");
803
+ return -EROFS;
804
+ }
805
+
801806 tid = txBegin(ip->i_sb, 0);
802807
803808 mutex_lock_nested(&JFS_IP(dir)->commit_mutex, COMMIT_MUTEX_PARENT);