@@ -1825,16 +1825,15 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
18251825 }
18261826 }
18271827
1828- #if IS_ENABLED (CONFIG_UNICODE )
1829- if (!inode && IS_CASEFOLDED (dir )) {
1828+ if (IS_ENABLED (CONFIG_UNICODE ) && !inode && IS_CASEFOLDED (dir )) {
18301829 /* Eventually we want to call d_add_ci(dentry, NULL)
18311830 * for negative dentries in the encoding case as
18321831 * well. For now, prevent the negative dentry
18331832 * from being cached.
18341833 */
18351834 return NULL ;
18361835 }
1837- #endif
1836+
18381837 return d_splice_alias (inode , dentry );
18391838}
18401839
@@ -3164,16 +3163,14 @@ static int ext4_rmdir(struct inode *dir, struct dentry *dentry)
31643163 ext4_fc_track_unlink (handle , dentry );
31653164 retval = ext4_mark_inode_dirty (handle , dir );
31663165
3167- #if IS_ENABLED (CONFIG_UNICODE )
31683166 /* VFS negative dentries are incompatible with Encoding and
31693167 * Case-insensitiveness. Eventually we'll want avoid
31703168 * invalidating the dentries here, alongside with returning the
31713169 * negative dentries at ext4_lookup(), when it is better
31723170 * supported by the VFS for the CI case.
31733171 */
3174- if (IS_CASEFOLDED (dir ))
3172+ if (IS_ENABLED ( CONFIG_UNICODE ) && IS_CASEFOLDED (dir ))
31753173 d_invalidate (dentry );
3176- #endif
31773174
31783175end_rmdir :
31793176 brelse (bh );
@@ -3275,16 +3272,15 @@ static int ext4_unlink(struct inode *dir, struct dentry *dentry)
32753272 goto out_trace ;
32763273
32773274 retval = __ext4_unlink (dir , & dentry -> d_name , d_inode (dentry ), dentry );
3278- #if IS_ENABLED ( CONFIG_UNICODE )
3275+
32793276 /* VFS negative dentries are incompatible with Encoding and
32803277 * Case-insensitiveness. Eventually we'll want avoid
32813278 * invalidating the dentries here, alongside with returning the
32823279 * negative dentries at ext4_lookup(), when it is better
32833280 * supported by the VFS for the CI case.
32843281 */
3285- if (IS_CASEFOLDED (dir ))
3282+ if (IS_ENABLED ( CONFIG_UNICODE ) && IS_CASEFOLDED (dir ))
32863283 d_invalidate (dentry );
3287- #endif
32883284
32893285out_trace :
32903286 trace_ext4_unlink_exit (dentry , retval );
0 commit comments