lkml.org 
[lkml]   [2007]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectPATCH [1/5] 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: 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 `-
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-07-15 21:01    [W:0.029 / U:31.372 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site