mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Aneesh Kumar K.V <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
c8b91accfa
commit
5fe0c23788
12 changed files with 59 additions and 18 deletions
|
|
@ -637,8 +637,10 @@ static int fuse_encode_fh(struct dentry *dentry, u32 *fh, int *max_len,
|
|||
u64 nodeid;
|
||||
u32 generation;
|
||||
|
||||
if (*max_len < len)
|
||||
if (*max_len < len) {
|
||||
*max_len = len;
|
||||
return 255;
|
||||
}
|
||||
|
||||
nodeid = get_fuse_inode(inode)->nodeid;
|
||||
generation = inode->i_generation;
|
||||
|
|
|
|||
Loading…
Reference in a new issue