Skip to content

Commit

Permalink
[XFS] don't encode parent in nfs filehandles unless nessecary
Browse files Browse the repository at this point in the history
As Dave pointed out after the export ops changes we now always encode the
parent into the filehandle for regular files, but it's not actually needed
when the filesystem is export with no_subtree_check. This one-liner fixes
xfs_fs_encode_fh to skip encoding the parent unless nessecary.

SGI-PV: 976035
SGI-Modid: xfs-linux-melb:xfs-kern:30535a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Lachlan McIlroy committed Apr 18, 2008
1 parent 126468b commit 24bd861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/linux-2.6/xfs_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ xfs_fs_encode_fh(
int len;

/* Directories don't need their parent encoded, they have ".." */
if (S_ISDIR(inode->i_mode))
if (S_ISDIR(inode->i_mode) || !connectable)
fileid_type = FILEID_INO32_GEN;
else
fileid_type = FILEID_INO32_GEN_PARENT;
Expand Down

0 comments on commit 24bd861

Please sign in to comment.