Skip to content
Snippets Groups Projects
Commit 8d291f52 authored by Yuri.Sh's avatar Yuri.Sh Committed by GitHub
Browse files

Merge pull request #101 from piotrsok2/master

Add support for NFS
parents 22910c93 934ad923
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2195,6 +2195,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
@@ -2448,6 +2487,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