]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
btrfs: fix type of parameter generation in btrfs_get_dentry
authorDavid Sterba <dsterba@suse.com>
Tue, 18 Oct 2022 14:05:52 +0000 (16:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 14:47:22 +0000 (15:47 +0100)
commit 2398091f9c2c8e0040f4f9928666787a3e8108a7 upstream.

The type of parameter generation has been u32 since the beginning,
however all callers pass a u64 generation, so unify the types to prevent
potential loss.

CC: stable@vger.kernel.org # 4.9+
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/export.c
fs/btrfs/export.h

index b6ce765aa7f339f64000872caa6c8228bb09a51f..5909d75570b0fcdb5028e6bfa5bd538158f3f0cf 100644 (file)
@@ -57,7 +57,7 @@ static int btrfs_encode_fh(struct inode *inode, u32 *fh, int *max_len,
 }
 
 struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
-                               u64 root_objectid, u32 generation,
+                               u64 root_objectid, u64 generation,
                                int check_generation)
 {
        struct btrfs_fs_info *fs_info = btrfs_sb(sb);
index 15db024621414efab3eca2f04b581bd37eae898b..b3bbe6de8aa0b31da8b40af7256150fa0e5e4f7e 100644 (file)
@@ -18,7 +18,7 @@ struct btrfs_fid {
 } __attribute__ ((packed));
 
 struct dentry *btrfs_get_dentry(struct super_block *sb, u64 objectid,
-                               u64 root_objectid, u32 generation,
+                               u64 root_objectid, u64 generation,
                                int check_generation);
 struct dentry *btrfs_get_parent(struct dentry *child);