From 399df603db5fe7dd5c408ec7b492b6792a3c63a3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jun 2012 22:41:54 +0400 Subject: [PATCH] --- yaml --- r: 312935 b: refs/heads/master c: 85d7d618c17a09cfd824c1ad4483c19e6f9637ff h: refs/heads/master i: 312933: cad69b00e8d1fda4214a6048f8e164f776b2e19a 312931: 99ff91bef258678c66cf243973b18f2e499c9300 312927: be4daecf66adf44f03e26ea8067d5986e2085ec8 v: v3 --- [refs] | 2 +- trunk/fs/file_table.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index de19730520d7..cc605774b4e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c4107b3097465e25f7d6a9b0ac0518b07b24e774 +refs/heads/master: 85d7d618c17a09cfd824c1ad4483c19e6f9637ff diff --git a/trunk/fs/file_table.c b/trunk/fs/file_table.c index a305d9e2d1b2..9ace2781931e 100644 --- a/trunk/fs/file_table.c +++ b/trunk/fs/file_table.c @@ -483,10 +483,8 @@ void mark_files_ro(struct super_block *sb) { struct file *f; -retry: lg_global_lock(&files_lglock); do_file_list_for_each_entry(sb, f) { - struct vfsmount *mnt; if (!S_ISREG(f->f_path.dentry->d_inode->i_mode)) continue; if (!file_count(f)) @@ -499,12 +497,7 @@ void mark_files_ro(struct super_block *sb) if (file_check_writeable(f) != 0) continue; file_release_write(f); - mnt = mntget(f->f_path.mnt); - /* This can sleep, so we can't hold the spinlock. */ - lg_global_unlock(&files_lglock); - mnt_drop_write(mnt); - mntput(mnt); - goto retry; + mnt_drop_write_file(f); } while_file_list_for_each_entry; lg_global_unlock(&files_lglock); }