summaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2014-09-09 00:08:51 +0400
committerChris Mason <clm@fb.com>2014-09-09 00:56:45 +0400
commitb0d5d10f41a0f1cd839408dd94427f2db3553bca (patch)
tree0245a9bf559bfab38f9a2812d3aebb252a81cebb /fs/btrfs/btrfs_inode.h
parent49dae1bc1c665817e434d01eefaa11967f618243 (diff)
downloadlinux-b0d5d10f41a0f1cd839408dd94427f2db3553bca.tar.xz
Btrfs: use insert_inode_locked4 for inode creation
Btrfs was inserting inodes into the hash table before we had fully set the inode up on disk. This leaves us open to rare races that allow two different inodes in memory for the same [root, inode] pair. This patch fixes things by using insert_inode_locked4 to insert an I_NEW inode and unlock_new_inode when we're ready for the rest of the kernel to use the inode. It also makes sure to init the operations pointers on the inode before going into the error handling paths. Signed-off-by: Chris Mason <clm@fb.com> Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
0 files changed, 0 insertions, 0 deletions