All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: PATCH [1/5] fs/file_table.c: use list_for_each_entry() instead of list_for_each()
Date: Sun, 15 Jul 2007 20:59:44 +0200	[thread overview]
Message-ID: <20070715185944.GF4034@traven> (raw)
In-Reply-To: <20070715185409.GE4034@traven>

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>

--

diff --git a/fs/file_table.c b/fs/file_table.c
index d17fd69..3ddd993 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -264,12 +264,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? */

-- 
Matthias Kaehlcke
Linux Application Developer
Barcelona

      The assumption that what currently exists must necessarily
        exist is the acid that corrodes all visionary thinking
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

  reply	other threads:[~2007-07-15 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-15 18:54 PATCH [0/5] file system core: use list_for_each_entry() instead of list_for_each() Matthias Kaehlcke
2007-07-15 18:59 ` Matthias Kaehlcke [this message]
2007-07-15 19:01 ` PATCH [2/5] fs/eventpoll.c: " Matthias Kaehlcke
2007-07-15 19:03 ` PATCH [3/5] fs/super.c: " Matthias Kaehlcke
2007-07-15 19:06 ` PATCH [4/5] fs/locks.c: " Matthias Kaehlcke
2007-07-15 19:08 ` PATCH [5/5] fs/block_dev.c: " Matthias Kaehlcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070715185944.GF4034@traven \
    --to=matthias.kaehlcke@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.