lkml.org 
[lkml]   [2017]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] fs/notify: fdinfo can report unsupported file handles.
On Mon, Dec 11, 2017 at 05:04:05PM +1100, NeilBrown wrote:
> @@ -385,7 +385,9 @@ int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid,
> {
> const struct export_operations *nop = inode->i_sb->s_export_op;
>
> - if (nop && nop->encode_fh)
> + if (nop)
> + return FILEID_INVALID;
> + if (nop->encode_fh)
> return nop->encode_fh(inode, fid->raw, max_len, parent);

This might as well have been

if (nop)
return FILEID_INVALID;
BUG();

Have you ever tested that?

\
 
 \ /
  Last update: 2017-12-11 07:31    [W:1.594 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site