Skip to content

Commit

Permalink
fs/file_table.c: use list_for_each_entry() instead of list_for_each()
Browse files Browse the repository at this point in the history
fs/file_table.c: use list_for_each_entry() instead of list_for_each()
in fs_may_remount_ro()

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Oct 19, 2007
1 parent 4e6045f commit cfdaf9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/file_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,11 @@ void file_kill(struct file *file)

int fs_may_remount_ro(struct super_block *sb)
{
struct list_head *p;
struct file *file;

/* Check that no files are currently opened for writing. */
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file *file = list_entry(p, struct file, f_u.fu_list);
list_for_each_entry(file, &sb->s_files, f_u.fu_list) {
struct inode *inode = file->f_path.dentry->d_inode;

/* File with pending delete? */
Expand Down

0 comments on commit cfdaf9e

Please sign in to comment.