fs: encode_fh: return FILEID_INVALID if invalid fid_type
This patch is a follow up on below patch:
[PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type
commit: 216b6cbdcb
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Vivek Trivedi <t.vivek@samsung.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: Sage Weil <sage@inktank.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -89,7 +89,7 @@ static int cleancache_get_key(struct inode *inode,
|
||||
fhfn = sb->s_export_op->encode_fh;
|
||||
if (fhfn) {
|
||||
len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL);
|
||||
if (len <= 0 || len == 255)
|
||||
if (len <= FILEID_ROOT || len == FILEID_INVALID)
|
||||
return -1;
|
||||
if (maxlen > CLEANCACHE_KEY_MAX)
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user