X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fsuper.c;h=c170551c23fe0a2af1e24f8a9b206c3b0f96d7ce;hb=864d7c4c068f23642efe91b33be3a84afe5f71e0;hp=1943fdf655faca2d3d1810cca8b36ac80c9d3593;hpb=96029c4e09ccbd73a6d0ed2b29e80bf2586ad7ef;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/super.c b/fs/super.c index 1943fdf655fa..c170551c23fe 100644 --- a/fs/super.c +++ b/fs/super.c @@ -615,45 +615,6 @@ out: return err; } -/** - * mark_files_ro - mark all files read-only - * @sb: superblock in question - * - * All files are marked read-only. We don't care about pending - * delete files so this should be used in 'force' mode only. - */ - -static void mark_files_ro(struct super_block *sb) -{ - struct file *f; - -retry: - file_list_lock(); - list_for_each_entry(f, &sb->s_files, f_u.fu_list) { - struct vfsmount *mnt; - if (!S_ISREG(f->f_path.dentry->d_inode->i_mode)) - continue; - if (!file_count(f)) - continue; - if (!(f->f_mode & FMODE_WRITE)) - continue; - f->f_mode &= ~FMODE_WRITE; - if (file_check_writeable(f) != 0) - continue; - file_release_write(f); - mnt = mntget(f->f_path.mnt); - file_list_unlock(); - /* - * This can sleep, so we can't hold - * the file_list_lock() spinlock. - */ - mnt_drop_write(mnt); - mntput(mnt); - goto retry; - } - file_list_unlock(); -} - /** * do_remount_sb - asks filesystem to change mount options. * @sb: superblock in question