 fs/namespace.c     |    1 -
 fs/super.c         |    4 ++--
 include/linux/fs.h |    2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)

diff -puN fs/super.c~sysrq-fs-cleanups-fixes fs/super.c
--- 25/fs/super.c~sysrq-fs-cleanups-fixes	2003-05-04 22:36:09.000000000 -0700
+++ 25-akpm/fs/super.c	2003-05-04 22:36:37.000000000 -0700
@@ -439,7 +439,7 @@ static void mark_files_ro(struct super_b
 	file_list_lock();
 	list_for_each_entry(f, &sb->s_files, f_list) {
 		if (S_ISREG(f->f_dentry->d_inode->i_mode) && file_count(f))
-			f->f_mode &= ~2;
+			f->f_mode &= ~FMODE_WRITE;
 	}
 	file_list_unlock();
 }
@@ -491,7 +491,7 @@ static void do_emergency_remount(unsigne
 		sb->s_count++;
 		spin_unlock(&sb_lock);
 		down_read(&sb->s_umount);
-		if (sb->s_bdev && !(sb->s_flags & MS_RDONLY))
+		if (sb->s_root && sb->s_bdev && !(sb->s_flags & MS_RDONLY))
 			do_remount_sb(sb, MS_RDONLY, NULL, 1);
 		drop_super(sb);
 		spin_lock(&sb_lock);
diff -puN fs/namespace.c~sysrq-fs-cleanups-fixes fs/namespace.c
--- 25/fs/namespace.c~sysrq-fs-cleanups-fixes	2003-05-04 22:37:30.000000000 -0700
+++ 25-akpm/fs/namespace.c	2003-05-04 22:37:40.000000000 -0700
@@ -24,7 +24,6 @@
 #include <asm/uaccess.h>
 
 extern struct vfsmount *do_kern_mount(const char *type, int flags, char *name, void *data);
-extern int do_remount_sb(struct super_block *sb, int flags, void *data, int force);
 extern int __init init_rootfs(void);
 extern int __init fs_subsys_init(void);
 
diff -puN include/linux/fs.h~sysrq-fs-cleanups-fixes include/linux/fs.h
--- 25/include/linux/fs.h~sysrq-fs-cleanups-fixes	2003-05-04 22:37:47.000000000 -0700
+++ 25-akpm/include/linux/fs.h	2003-05-04 22:38:13.000000000 -0700
@@ -1115,6 +1115,8 @@ extern void sync_supers(void);
 extern void sync_filesystems(int wait);
 extern void emergency_sync(void);
 extern void emergency_remount(void);
+extern int do_remount_sb(struct super_block *sb, int flags,
+			void *data, int force);
 extern sector_t bmap(struct inode *, sector_t);
 extern int setattr_mask(unsigned int);
 extern int notify_change(struct dentry *, struct iattr *);

_
