Skip to content
Snippets Groups Projects
Commit 934ad923 authored by Piotr Sokolowski's avatar Piotr Sokolowski
Browse files

Add support for NFS exporting

parent 051167ce
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2163,6 +2163,45 @@ const struct super_operations exfat_sops = {
.show_options = exfat_show_options,
};
 
/*======================================================================*/
/* Export Operations */
/*======================================================================*/
static struct inode *exfat_nfs_get_inode(struct super_block *sb,
u64 ino, u32 generation)
{
struct inode *inode = NULL;
if (ino < EXFAT_ROOT_INO)
return inode;
inode = ilookup(sb, ino);
if (inode && generation && (inode->i_generation != generation)) {
iput(inode);
inode = NULL;
}
return inode;
}
static struct dentry *exfat_fh_to_dentry(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
exfat_nfs_get_inode);
}
static struct dentry *exfat_fh_to_parent(struct super_block *sb, struct fid *fid,
int fh_len, int fh_type)
{
return generic_fh_to_parent(sb, fid, fh_len, fh_type,
exfat_nfs_get_inode);
}
const struct export_operations exfat_export_ops = {
.fh_to_dentry = exfat_fh_to_dentry,
.fh_to_parent = exfat_fh_to_parent,
};
/*======================================================================*/
/* Super Block Read Operations */
/*======================================================================*/
Loading
Loading
@@ -2416,6 +2455,7 @@ static int exfat_fill_super(struct super_block *sb, void *data, int silent)
sb->s_flags |= MS_NODIRATIME;
sb->s_magic = EXFAT_SUPER_MAGIC;
sb->s_op = &exfat_sops;
sb->s_export_op = &exfat_export_ops;
 
error = parse_options(data, silent, &debug, &sbi->options);
if (error)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment