projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
fs
/
exportfs
/
expfs.c
diff --git
a/fs/exportfs/expfs.c
b/fs/exportfs/expfs.c
index 4b6825740dd5e6cfcf38918d3c8e477a677e94a4..b05acb7961355dfb680e49f3145a11065f6ac851 100644
(file)
--- a/
fs/exportfs/expfs.c
+++ b/
fs/exportfs/expfs.c
@@
-320,9
+320,14
@@
static int export_encode_fh(struct dentry *dentry, struct fid *fid,
struct inode * inode = dentry->d_inode;
int len = *max_len;
int type = FILEID_INO32_GEN;
struct inode * inode = dentry->d_inode;
int len = *max_len;
int type = FILEID_INO32_GEN;
-
- if (len < 2 || (connectable && len < 4))
+
+ if (connectable && (len < 4)) {
+ *max_len = 4;
+ return 255;
+ } else if (len < 2) {
+ *max_len = 2;
return 255;
return 255;
+ }
len = 2;
fid->i32.ino = inode->i_ino;
len = 2;
fid->i32.ino = inode->i_ino;
@@
-369,6
+374,8
@@
struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
/*
* Try to get any dentry for the given file handle from the filesystem.
*/
/*
* Try to get any dentry for the given file handle from the filesystem.
*/
+ if (!nop || !nop->fh_to_dentry)
+ return ERR_PTR(-ESTALE);
result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
if (!result)
result = ERR_PTR(-ESTALE);
result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
if (!result)
result = ERR_PTR(-ESTALE);