Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfdaf9e5 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds
Browse files

fs/file_table.c: use list_for_each_entry() instead of list_for_each()



fs/file_table.c: use list_for_each_entry() instead of list_for_each()
in fs_may_remount_ro()

Signed-off-by: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4e6045f1
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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? */