On Thu, Dec 05, 2019 at 10:36:04AM -0800, Omar Sandoval wrote: > From: Omar Sandoval <osandov@xxxxxx> > > When you snapshot a subvolume containing a subvolume, you get a > placeholder directory where the subvolume would be. These directories > have their own btrfs_dir_ro_inode_operations. > > Al pointed out [1] that these directories can use simple_lookup() > instead of btrfs_lookup(), as they are always empty. Furthermore, they > can use the default generic_permission() instead of btrfs_permission(); > the additional checks in the latter don't matter because we can't write > to the directory anyways. Finally, they can use the default > generic_update_time() instead of btrfs_update_time(), as the inode > doesn't exist on disk and doesn't need any special handling. > > All together, this means that we can get rid of > btrfs_dir_ro_inode_operations and use simple_dir_inode_operations > instead. > > 1: https://lore.kernel.org/linux-btrfs/20190929052934.GY26530@xxxxxxxxxxxxxxxxxx/ > > Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Omar Sandoval <osandov@xxxxxx> Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx> Thanks, Josef
