Skip to content

Commit

Permalink
btrfs: fix type of parameter generation in btrfs_get_dentry
Browse files Browse the repository at this point in the history
commit 2398091 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>
  • Loading branch information
kdave authored and gregkh committed Nov 10, 2022
1 parent 007058e commit 450d748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,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);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/export.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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);

Expand Down

0 comments on commit 450d748

Please sign in to comment.