linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: ext4_mknod:  always set i_op
@ 2012-09-05 16:51 Bernd Schubert
  2012-09-27  1:25 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Schubert @ 2012-09-05 16:51 UTC (permalink / raw)
  To: linux-ext4@vger.kernel.org List, Ted Ts'o

While I was looking through the code, I noticed i_op 
is not always initialized, although operations such 
as setattr probably always should be set.


ext4: ext4_mknod:  always set i_op

From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>

ext4_special_inode_operations have their own ifdef CONFIG_EXT4_FS_XATTR
to mask those methods. And ext4_iget also always sets it, so there is
an inconsistency.

Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
---
 fs/ext4/namei.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 2a42cc0..d13873d 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2149,9 +2149,7 @@ retry:
 	err = PTR_ERR(inode);
 	if (!IS_ERR(inode)) {
 		init_special_inode(inode, inode->i_mode, rdev);
-#ifdef CONFIG_EXT4_FS_XATTR
 		inode->i_op = &ext4_special_inode_operations;
-#endif
 		err = ext4_add_nondir(handle, dentry, inode);
 	}
 	ext4_journal_stop(handle);



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

* Re: ext4: ext4_mknod: always set i_op
  2012-09-05 16:51 [PATCH] ext4: ext4_mknod: always set i_op Bernd Schubert
@ 2012-09-27  1:25 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2012-09-27  1:25 UTC (permalink / raw)
  To: Bernd Schubert; +Cc: linux-ext4@vger.kernel.org List

On Wed, Sep 05, 2012 at 06:51:04AM -0000, Bernd Schubert wrote:
> While I was looking through the code, I noticed i_op 
> is not always initialized, although operations such 
> as setattr probably always should be set.
> 
> 
> ext4: ext4_mknod:  always set i_op
> 
> From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
> 
> ext4_special_inode_operations have their own ifdef CONFIG_EXT4_FS_XATTR
> to mask those methods. And ext4_iget also always sets it, so there is
> an inconsistency.
> 
> Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>

Applied, thanks!!

						- Ted

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

end of thread, other threads:[~2012-09-27  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 16:51 [PATCH] ext4: ext4_mknod: always set i_op Bernd Schubert
2012-09-27  1:25 ` Theodore Ts'o

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