diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-01-29 13:13:25 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-14 13:15:28 (GMT) |
commit | 5fe0c2378884e68beb532f5890cc0e3539ac747b (patch) | |
tree | be25414052184e146049ea6466854366559d5528 /fs/udf | |
parent | c8b91accfa1059d5565443193d89572eca2f5dd6 (diff) | |
download | linux-fsl-qoriq-5fe0c2378884e68beb532f5890cc0e3539ac747b.tar.xz |
exportfs: Return the minimum required handle size
The exportfs encode handle function should return the minimum required
handle size. This helps user to find out the handle size by passing 0
handle size in the first step and then redoing to the call again with
the returned handle size value.
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/namei.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index b7c338d..f1dce84 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1286,8 +1286,13 @@ static int udf_encode_fh(struct dentry *de, __u32 *fh, int *lenp, struct fid *fid = (struct fid *)fh; int type = FILEID_UDF_WITHOUT_PARENT; - if (len < 3 || (connectable && len < 5)) + if (connectable && (len < 5)) { + *lenp = 5; + return 255; + } else if (len < 3) { + *lenp = 3; return 255; + } *lenp = 3; fid->udf.block = location.logicalBlockNum; |