Skip to content

Commit

Permalink
xfs: fix dentry aliasing issues in open_by_handle
Browse files Browse the repository at this point in the history
Open by handle just grabs an inode by handle and then creates itself
a dentry for it.  While this works for regular files it is horribly
broken for directories, where the VFS locking relies on the fact that
there is only just one single dentry for a given inode, and that
these are always connected to the root of the filesystem so that
it's locking algorithms work (see Documentations/filesystems/Locking)

Remove all the existing open by handle code and replace it with a small
wrapper around the exportfs code which deals with all these issues.
At the same time we also make the checks for a valid handle strict
enough to reject all not perfectly well formed handles - given that
we never hand out others that's okay and simplifies the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Jan 19, 2009
1 parent f3b8436 commit ab596ad
Showing 4 changed files with 196 additions and 300 deletions.
1 change: 1 addition & 0 deletions fs/xfs/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config XFS_FS
tristate "XFS filesystem support"
depends on BLOCK
select EXPORTFS
help
XFS is a high performance journaling filesystem which originated
on the SGI IRIX platform. It is completely multi-threaded, can
Loading

0 comments on commit ab596ad

Please sign in to comment.