linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ext2: fix incorrect i_op for special inode
@ 2020-05-22  4:40 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 ` [PATCH 1/2] ext2: fix incorrect i_op for special inode Jan Kara
  0 siblings, 2 replies; 3+ messages in thread
From: Chengguang Xu @ 2020-05-22  4:40 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4, Chengguang Xu

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>
---
 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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-22 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 1/2] ext2: fix incorrect i_op for special inode Jan Kara

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).