diff options
Diffstat (limited to 'fs/file_table.c')
-rw-r--r-- | fs/file_table.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/file_table.c b/fs/file_table.c index 3176fefc92e1..664e3f2309b8 100644 --- a/fs/file_table.c +++ b/fs/file_table.c | |||
@@ -323,12 +323,11 @@ void file_kill(struct file *file) | |||
323 | 323 | ||
324 | int fs_may_remount_ro(struct super_block *sb) | 324 | int fs_may_remount_ro(struct super_block *sb) |
325 | { | 325 | { |
326 | struct list_head *p; | 326 | struct file *file; |
327 | 327 | ||
328 | /* Check that no files are currently opened for writing. */ | 328 | /* Check that no files are currently opened for writing. */ |
329 | file_list_lock(); | 329 | file_list_lock(); |
330 | list_for_each(p, &sb->s_files) { | 330 | list_for_each_entry(file, &sb->s_files, f_u.fu_list) { |
331 | struct file *file = list_entry(p, struct file, f_u.fu_list); | ||
332 | struct inode *inode = file->f_path.dentry->d_inode; | 331 | struct inode *inode = file->f_path.dentry->d_inode; |
333 | 332 | ||
334 | /* File with pending delete? */ | 333 | /* File with pending delete? */ |