summaryrefslogtreecommitdiff
path: root/fs/btrfs/props.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2022-03-14 18:12:34 -0700
committerDavid Sterba <dsterba@suse.com>2022-05-16 17:03:08 +0200
commit3538d68dbd97a2f5599bf39aeee47f027417fc39 (patch)
treeeb1126687925a136a5c1a13f15ed22abf6b833ae /fs/btrfs/props.c
parent5f465bf1f15aec52bed8d3e17738b303ae8e1a3c (diff)
btrfs: reserve correct number of items for inode creation
The various inode creation code paths do not account for the compression property, POSIX ACLs, or the parent inode item when starting a transaction. Fix it by refactoring all of these code paths to use a new function, btrfs_new_inode_prepare(), which computes the correct number of items. To do so, it needs to know whether POSIX ACLs will be created, so move the ACL creation into that function. To reduce the number of arguments that need to be passed around for inode creation, define struct btrfs_new_inode_args containing all of the relevant information. btrfs_new_inode_prepare() will also be a good place to set up the fscrypt context and encrypted filename in the future. Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/props.c')
0 files changed, 0 insertions, 0 deletions