From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Fabian Frederick <fabf@skynet.be>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Tytso <tytso@mit.edu>,
JFS Discussion <jfs-discussion@lists.sourceforge.net>
Subject: Re: [PATCH V2] fs/jfs/jfs_inode.c: atomically set inode->i_flags
Date: Mon, 14 Apr 2014 12:55:32 -0500 [thread overview]
Message-ID: <534C2114.8030502@oracle.com> (raw)
In-Reply-To: <20140414093901.ea2d873d712ca4c8155d7827@skynet.be>
Looks good to me. I'll push it upstream.
Thanks,
Dave
On 04/14/2014 02:39 AM, Fabian Frederick wrote:
> According to commit 5f16f3225b0624
>
> ext4: atomically set inode->i_flags in ext4_set_inode_flags()
>
> Inspired-by: "Theodore Ts'o" <tytso@mit.edu>
> Cc: Dave Kleikamp <shaggy@kernel.org>
> Cc: "Theodore Ts'o" <tytso@mit.edu>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> fs/jfs/jfs_inode.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
> index 7f464c5..6b0f816 100644
> --- a/fs/jfs/jfs_inode.c
> +++ b/fs/jfs/jfs_inode.c
> @@ -29,20 +29,20 @@
> void jfs_set_inode_flags(struct inode *inode)
> {
> unsigned int flags = JFS_IP(inode)->mode2;
> -
> - inode->i_flags &= ~(S_IMMUTABLE | S_APPEND |
> - S_NOATIME | S_DIRSYNC | S_SYNC);
> + unsigned int new_fl = 0;
>
> if (flags & JFS_IMMUTABLE_FL)
> - inode->i_flags |= S_IMMUTABLE;
> + new_fl |= S_IMMUTABLE;
> if (flags & JFS_APPEND_FL)
> - inode->i_flags |= S_APPEND;
> + new_fl |= S_APPEND;
> if (flags & JFS_NOATIME_FL)
> - inode->i_flags |= S_NOATIME;
> + new_fl |= S_NOATIME;
> if (flags & JFS_DIRSYNC_FL)
> - inode->i_flags |= S_DIRSYNC;
> + new_fl |= S_DIRSYNC;
> if (flags & JFS_SYNC_FL)
> - inode->i_flags |= S_SYNC;
> + new_fl |= S_SYNC;
> + inode_set_flags(inode, new_fl, S_IMMUTABLE | S_APPEND | S_NOATIME |
> + S_DIRSYNC | S_SYNC);
> }
>
> void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)
>
prev parent reply other threads:[~2014-04-14 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 7:39 [PATCH V2] fs/jfs/jfs_inode.c: atomically set inode->i_flags Fabian Frederick
2014-04-14 17:55 ` Dave Kleikamp [this message]
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=534C2114.8030502@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=fabf@skynet.be \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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.