From: Andrew Morton Cc: Dave Hansen Signed-off-by: Andrew Morton --- fs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN fs/super.c~keep-track-of-mnt_writer-state-of-struct-file-fix-warn_on-fix fs/super.c --- a/fs/super.c~keep-track-of-mnt_writer-state-of-struct-file-fix-warn_on-fix +++ a/fs/super.c @@ -570,7 +570,8 @@ static void mark_files_ro(struct super_b retry: file_list_lock(); list_for_each_entry(f, &sb->s_files, f_u.fu_list) { - struct vfsmount mnt; + struct vfsmount *mnt; + if (!S_ISREG(f->f_path.dentry->d_inode->i_mode)) continue; if (!file_count(f)) _