From: Steven Whitehouse <swhiteho@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, jack@suse.cz, hch@infradead.org,
akpm@linux-foundation.org, toshi.okajima@jp.fujitsu.com,
mszeredi@suse.cz
Subject: Re: [PATCH 10/13] filesystems: add set_nlink()
Date: Thu, 13 Oct 2011 17:33:19 +0100 [thread overview]
Message-ID: <1318523599.2719.45.camel@menhir> (raw)
In-Reply-To: <1318430946-7091-11-git-send-email-miklos@szeredi.hu>
Hi,
On Wed, 2011-10-12 at 16:49 +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@suse.cz>
>
> Replace remaining direct i_nlink updates with a new set_nlink()
> updater function.
>
> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
> ---
[snip]
> diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
> index da21eca..102cf5e 100644
> --- a/fs/gfs2/glops.c
> +++ b/fs/gfs2/glops.c
> @@ -277,7 +277,7 @@ static void gfs2_set_nlink(struct inode *inode, u32 nlink)
> if (nlink == 0)
> clear_nlink(inode);
> else
> - inode->i_nlink = nlink;
> + set_nlink(inode, nlink);
> }
> }
So long as it is ok to call set_nlink() with nlink == 0, then the if
statement here can be removed and just replaced with set_nlink()
Steve.
next prev parent reply other threads:[~2011-10-13 16:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 14:48 [PATCH 0/13] read-only remount race fix v7 Miklos Szeredi
2011-10-12 14:48 ` [PATCH 01/13] vfs: ignore error on forced remount Miklos Szeredi
2011-10-12 14:48 ` [PATCH 02/13] vfs: keep list of mounts for each superblock Miklos Szeredi
2011-10-12 14:48 ` [PATCH 03/13] vfs: protect remounting superblock read-only Miklos Szeredi
2011-10-12 14:48 ` [PATCH 04/13] vfs: fs_may_remount_ro: turn unnecessary check into a WARN_ON Miklos Szeredi
2011-10-12 14:48 ` [PATCH 05/13] hypfs: remove unnecessary nlink setting Miklos Szeredi
2011-10-12 14:48 ` [PATCH 06/13] jfs: " Miklos Szeredi
2011-10-12 15:26 ` Dave Kleikamp
2011-10-12 14:49 ` [PATCH 07/13] ocfs2: " Miklos Szeredi
2011-10-12 14:49 ` [PATCH 08/13] logfs: " Miklos Szeredi
2011-10-12 14:49 ` [PATCH 09/13] filesystems: add missing nlink wrappers Miklos Szeredi
2011-10-12 14:49 ` [PATCH 10/13] filesystems: add set_nlink() Miklos Szeredi
2011-10-13 16:33 ` Steven Whitehouse [this message]
2011-10-14 15:04 ` Miklos Szeredi
2011-10-12 14:49 ` [PATCH 11/13] vfs: protect i_nlink Miklos Szeredi
2011-10-12 14:49 ` [PATCH 12/13] vfs: count unlinked inodes Miklos Szeredi
2011-10-28 6:08 ` Christoph Hellwig
2011-10-28 7:53 ` Miklos Szeredi
2011-10-28 8:04 ` Christoph Hellwig
2011-10-28 8:20 ` Miklos Szeredi
2011-10-28 8:29 ` Christoph Hellwig
2011-10-12 14:49 ` [PATCH 13/13] vfs: prevent remount read-only if pending removes Miklos Szeredi
2011-10-12 15:03 ` [PATCH 0/13] read-only remount race fix v7 Christoph Hellwig
2011-10-12 15:09 ` Miklos Szeredi
2011-10-13 7:10 ` Toshiyuki Okajima
2011-10-18 6:28 ` Toshiyuki Okajima
2011-10-18 9:02 ` Miklos Szeredi
-- strict thread matches above, loose matches on Subject: below --
2011-10-28 12:13 [PATCH 00/13] read-only remount race fix v9 Miklos Szeredi
2011-10-28 12:13 ` [PATCH 10/13] filesystems: add set_nlink() Miklos Szeredi
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=1318523599.2719.45.camel@menhir \
--to=swhiteho@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@suse.cz \
--cc=toshi.okajima@jp.fujitsu.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).