diff options
author | Richard Yao <[email protected]> | 2012-07-23 10:55:48 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-07-23 12:29:23 -0700 |
commit | 756c3e5a9ce36461939a8dc421918e1c3a379fa6 (patch) | |
tree | bca854f3c2e095cdd5a12b4dad61290872b69ffc /module | |
parent | ed3fc80048f1d11f0b77382f5c378bb4c11787fd (diff) |
Linux 3.5 compat, eops->encode_fh() takes inodes
The export_operations member ->encode_fh() has been updated to
take both the child and parent inodes. This interface used to
take the child dentry and a bool describing if the parent is needed.
NOTE: While updating this code I noticed that we do not currently
cleanly handle the case where we're passed a connectable parent.
This code should be audited to make sure we're doing the right thing.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #784
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zpl_export.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/module/zfs/zpl_export.c b/module/zfs/zpl_export.c index f82ee3088..395c5584c 100644 --- a/module/zfs/zpl_export.c +++ b/module/zfs/zpl_export.c @@ -30,10 +30,15 @@ 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); |