diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-02-17 01:48:11 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-26 02:46:10 -0500 |
commit | 94e07a7590ae855bae0536c42b3086fadc7c83a8 (patch) | |
tree | a34b3acd03dc5da51b3307478dd572fbd6d22880 /mm | |
parent | 182be684784334598eee1d90274e7f7aa0063616 (diff) |
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: 216b6cbdcbd86b1db0754d58886b466ae31f5a63
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/cleancache.c | 2 | ||||
-rw-r--r-- | mm/shmem.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mm/cleancache.c b/mm/cleancache.c index 32e6f4136fa2..d76ba74be2d0 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c | |||
@@ -89,7 +89,7 @@ static int cleancache_get_key(struct inode *inode, | |||
89 | fhfn = sb->s_export_op->encode_fh; | 89 | fhfn = sb->s_export_op->encode_fh; |
90 | if (fhfn) { | 90 | if (fhfn) { |
91 | len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL); | 91 | len = (*fhfn)(inode, &key->u.fh[0], &maxlen, NULL); |
92 | if (len <= 0 || len == 255) | 92 | if (len <= FILEID_ROOT || len == FILEID_INVALID) |
93 | return -1; | 93 | return -1; |
94 | if (maxlen > CLEANCACHE_KEY_MAX) | 94 | if (maxlen > CLEANCACHE_KEY_MAX) |
95 | return -1; | 95 | return -1; |
diff --git a/mm/shmem.c b/mm/shmem.c index 25cd688bd208..320ffc1d1d1e 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2351,7 +2351,7 @@ static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len, | |||
2351 | { | 2351 | { |
2352 | if (*len < 3) { | 2352 | if (*len < 3) { |
2353 | *len = 3; | 2353 | *len = 3; |
2354 | return 255; | 2354 | return FILEID_INVALID; |
2355 | } | 2355 | } |
2356 | 2356 | ||
2357 | if (inode_unhashed(inode)) { | 2357 | if (inode_unhashed(inode)) { |