aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c
index 47e554c12e..f961e03079 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -221,6 +221,24 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
221} 221}
222 222
223/* 223/*
224 * Superblock locking. We really ought to get rid of these two.
225 */
226void lock_super(struct super_block * sb)
227{
228 get_fs_excl();
229 mutex_lock(&sb->s_lock);
230}
231
232void unlock_super(struct super_block * sb)
233{
234 put_fs_excl();
235 mutex_unlock(&sb->s_lock);
236}
237
238EXPORT_SYMBOL(lock_super);
239EXPORT_SYMBOL(unlock_super);
240
241/*
224 * Write out and wait upon all dirty data associated with this 242 * Write out and wait upon all dirty data associated with this
225 * superblock. Filesystem data as well as the underlying block 243 * superblock. Filesystem data as well as the underlying block
226 * device. Takes the superblock lock. Requires a second blkdev 244 * device. Takes the superblock lock. Requires a second blkdev
@@ -552,7 +570,7 @@ static void mark_files_ro(struct super_block *sb)
552 570
553 file_list_lock(); 571 file_list_lock();
554 list_for_each_entry(f, &sb->s_files, f_u.fu_list) { 572 list_for_each_entry(f, &sb->s_files, f_u.fu_list) {
555 if (S_ISREG(f->f_dentry->d_inode->i_mode) && file_count(f)) 573 if (S_ISREG(f->f_path.dentry->d_inode->i_mode) && file_count(f))
556 f->f_mode &= ~FMODE_WRITE; 574 f->f_mode &= ~FMODE_WRITE;
557 } 575 }
558 file_list_unlock(); 576 file_list_unlock();