summaryrefslogtreecommitdiff
path: root/fs/crypto/fscrypt_private.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-03-31 23:29:00 +0300
committerIlya Dryomov <idryomov@gmail.com>2022-08-03 01:54:11 +0300
commit18cc912b8a2acaf32589241fbac47192ab90db14 (patch)
tree898158dda437c2d4ae1d4fdd9eedc14eda0732fc /fs/crypto/fscrypt_private.h
parent3d7cb6b04c3f3115719235cc6866b10326de34cd (diff)
downloadlinux-18cc912b8a2acaf32589241fbac47192ab90db14.tar.xz
fs: change test in inode_insert5 for adding to the sb list
inode_insert5 currently looks at I_CREATING to decide whether to insert the inode into the sb list. This test is a bit ambiguous, as I_CREATING state is not directly related to that list. This test is also problematic for some upcoming ceph changes to add fscrypt support. We need to be able to allocate an inode using new_inode and insert it into the hash later iff we end up using it, and doing that now means that we double add it and corrupt the list. What we really want to know in this test is whether the inode is already in its superblock list, and then add it if it isn't. Have it test for list_empty instead and ensure that we always initialize the list by doing it in inode_init_once. It's only ever removed from the list with list_del_init, so that should be sufficient. Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/crypto/fscrypt_private.h')
0 files changed, 0 insertions, 0 deletions