Skip to content

Commit

Permalink
ext4: always set i_op in ext4_mknod()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
  • Loading branch information
Bernd Schubert authored and Theodore Ts'o committed Sep 27, 2012
1 parent 63fedaf commit 6a08f44
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2156,9 +2156,7 @@ static int ext4_mknod(struct inode *dir, struct dentry *dentry,
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);
Expand Down

0 comments on commit 6a08f44

Please sign in to comment.