patch-1.3.78 linux/fs/super.c
Next file: linux/fs/umsdos/ioctl.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Sun Mar 24 20:07:00 1996
- Orig file:
v1.3.77/linux/fs/super.c
- Orig date:
Wed Mar 13 10:09:21 1996
diff -u --recursive --new-file v1.3.77/linux/fs/super.c linux/fs/super.c
@@ -612,6 +612,9 @@
struct vfsmount *vfsmnt;
int error;
+ if (!(flags & MS_RDONLY) && dev && is_read_only(dev))
+ return -EACCES;
+ /*flags |= MS_RDONLY;*/
error = namei(dir_name, &dir_i);
if (error)
return error;
@@ -656,6 +659,7 @@
static int do_remount_sb(struct super_block *sb, int flags, char *data)
{
int retval;
+ struct vfsmount *vfsmnt;
if (!(flags & MS_RDONLY) && sb->s_dev && is_read_only(sb->s_dev))
return -EACCES;
@@ -671,6 +675,9 @@
}
sb->s_flags = (sb->s_flags & ~MS_RMT_MASK) |
(flags & MS_RMT_MASK);
+ vfsmnt = lookup_vfsmnt(sb->s_dev);
+ if (vfsmnt)
+ vfsmnt->mnt_flags = sb->s_flags;
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this