Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: always set i_op in ext4_mknod()

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

authored by

Bernd Schubert and committed by
Theodore Ts'o
6a08f447 63fedaf1

-2
-2
fs/ext4/namei.c
··· 2156 2156 err = PTR_ERR(inode); 2157 2157 if (!IS_ERR(inode)) { 2158 2158 init_special_inode(inode, inode->i_mode, rdev); 2159 - #ifdef CONFIG_EXT4_FS_XATTR 2160 2159 inode->i_op = &ext4_special_inode_operations; 2161 - #endif 2162 2160 err = ext4_add_nondir(handle, dentry, inode); 2163 2161 } 2164 2162 ext4_journal_stop(handle);