From: Jan Kara <jack@suse.cz>
To: Chengguang Xu <cgxu519@mykernel.net>
Cc: jack@suse.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] ext2: fix incorrect i_op for special inode
Date: Fri, 22 May 2020 15:11:45 +0200 [thread overview]
Message-ID: <20200522131145.GD14199@quack2.suse.cz> (raw)
In-Reply-To: <20200522044035.24190-1-cgxu519@mykernel.net>
On Fri 22-05-20 12:40:34, Chengguang Xu wrote:
> We should always set &ext2_special_inode_operations to i_op
> for special inode regardless of CONFIG_EXT2_FS_XATTR setting.
>
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Thanks. I've applied both patches. I've just slightly expanded changelog of
this patch to better explain the implications of the change.
Honza
> ---
> fs/ext2/namei.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
> index ccfbbf59e2fc..1a5421a34ef7 100644
> --- a/fs/ext2/namei.c
> +++ b/fs/ext2/namei.c
> @@ -136,9 +136,7 @@ static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode,
> err = PTR_ERR(inode);
> if (!IS_ERR(inode)) {
> init_special_inode(inode, inode->i_mode, rdev);
> -#ifdef CONFIG_EXT2_FS_XATTR
> inode->i_op = &ext2_special_inode_operations;
> -#endif
> mark_inode_dirty(inode);
> err = ext2_add_nondir(dentry, inode);
> }
> --
> 2.20.1
>
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2020-05-22 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-22 4:40 [PATCH 1/2] ext2: fix incorrect i_op for special inode Chengguang Xu
2020-05-22 4:40 ` [PATCH 2/2] ext2: code cleanup by removing ifdef macro surrounding Chengguang Xu
2020-05-22 13:11 ` Jan Kara [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=20200522131145.GD14199@quack2.suse.cz \
--to=jack@suse.cz \
--cc=cgxu519@mykernel.net \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
/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).