X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzpl_export.c;h=395c5584cce94fe1d837ed495ff8d9eba6eb7507;hb=44f21da41c441bfceec7b825991b6e68321d78a2;hp=4fe998437f6aadfaa339e52f406f3c26ab1619fe;hpb=2cf7f52bc42f215d4ef27d0fd75fc1b1417cb841;p=zfs.git diff --git a/module/zfs/zpl_export.c b/module/zfs/zpl_export.c index 4fe9984..395c558 100644 --- a/module/zfs/zpl_export.c +++ b/module/zfs/zpl_export.c @@ -25,14 +25,20 @@ #include #include +#include #include static int +#ifdef HAVE_ENCODE_FH_WITH_INODE +zpl_encode_fh(struct inode *ip, __u32 *fh, int *max_len, struct inode *parent) +{ +#else zpl_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connectable) { - fid_t *fid = (fid_t *)fh; struct inode *ip = dentry->d_inode; +#endif /* HAVE_ENCODE_FH_WITH_INODE */ + fid_t *fid = (fid_t *)fh; int len_bytes, rc; len_bytes = *max_len * sizeof (__u32); @@ -42,7 +48,10 @@ zpl_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connectable) fid->fid_len = len_bytes - offsetof(fid_t, fid_data); - rc = zfs_fid(ip, fid); + if (zfsctl_is_node(ip)) + rc = zfsctl_fid(ip, fid); + else + rc = zfs_fid(ip, fid); len_bytes = offsetof(fid_t, fid_data) + fid->fid_len; *max_len = roundup(len_bytes, sizeof (__u32)) / sizeof (__u32);