mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
|
|
@ -757,8 +757,10 @@ fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int connectable)
|
|||
struct inode *inode = de->d_inode;
|
||||
u32 ipos_h, ipos_m, ipos_l;
|
||||
|
||||
if (len < 5)
|
||||
if (len < 5) {
|
||||
*lenp = 5;
|
||||
return 255; /* no room */
|
||||
}
|
||||
|
||||
ipos_h = MSDOS_I(inode)->i_pos >> 8;
|
||||
ipos_m = (MSDOS_I(inode)->i_pos & 0xf0) << 24;
|
||||
|
|
|
|||
Loading…
Reference in a new issue