On Thu, Jan 03, 2008 at 07:33:11PM +0100, Christoph Hellwig wrote:
> 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.
ping?
>
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
>
> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2008-01-02
> 17:02:48.000000000 +0100
> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2008-01-03
> 19:30:51.000000000 +0100
> @@ -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;
---end quoted text---
|