Skip to content

Commit 53a7c17

Browse files
committed
ovl: fix wrong detection of 32bit inode numbers
The implicit FILEID_INO32_GEN encoder was changed to be explicit, so we need to fix the detection. When mounting overlayfs with upperdir and lowerdir on different ext4 filesystems, the expected kmsg log is: overlayfs: "xino" feature enabled using 32 upper inode bits. But instead, since the regressing commit, the kmsg log was: overlayfs: "xino" feature enabled using 2 upper inode bits. Fixes: e21fc20 ("exportfs: make ->encode_fh() a mandatory method for NFS export") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Amir Goldstein <amir73il@gmail.com>
1 parent f338e77 commit 53a7c17

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fs/overlayfs/util.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ int ovl_can_decode_fh(struct super_block *sb)
8585
if (!exportfs_can_decode_fh(sb->s_export_op))
8686
return 0;
8787

88-
return sb->s_export_op->encode_fh ? -1 : FILEID_INO32_GEN;
88+
if (sb->s_export_op->encode_fh == generic_encode_ino32_fh)
89+
return FILEID_INO32_GEN;
90+
91+
return -1;
8992
}
9093

9194
struct dentry *ovl_indexdir(struct super_block *sb)

0 commit comments

Comments
 (0)