Commit d995db9d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christoph Hellwig

[PATCH] Small cleanup of nfsd export checks

Separate checks for !FS_REQUIRES_DEV and missing fsid option
and missing export operations, second check for missing export
operations and a small cleanup as side effect.
parent 313d90b7
......@@ -315,17 +315,19 @@ exp_export(struct nfsctl_export *nxp)
* 2: We must be able to find an inode from a filehandle.
* This means that s_export_op must be set.
*/
if (((inode->i_sb->s_type->fs_flags & FS_REQUIRES_DEV)
|| (nxp->ex_flags & NFSEXP_FSID))
&&
inode->i_sb->s_export_op)
/* Ok, we can export it */;
else {
if (!(inode->i_sb->s_type->fs_flags & FS_REQUIRES_DEV)) {
if (!(nxp->ex_flags & NFSEXP_FSID)) {
dprintk("exp_export: export of non-dev fs without fsid");
goto finish;
}
}
if (!inode->i_sb->s_export_op) {
dprintk("exp_export: export of invalid fs type.\n");
goto finish;
}
if (inode->i_sb->s_export_op &&
!inode->i_sb->s_export_op->find_exported_dentry)
/* Ok, we can export it */;
if (!inode->i_sb->s_export_op->find_exported_dentry)
inode->i_sb->s_export_op->find_exported_dentry =
find_exported_dentry;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment