staticint nfs4_write_inode(struct inode *inode, struct writeback_control *wbc)
{ int ret = nfs_write_inode(inode, wbc);
if (ret == 0)
ret = pnfs_layoutcommit_inode(inode,
wbc->sync_mode == WB_SYNC_ALL); return ret;
}
/* *CleanoutanyremainingNFSv4statethatmightbeleftoverdue *toopen()callsthatpassednfs_atomic_lookup,butfailedtocall *nfs_open().
*/ staticvoid nfs4_evict_inode(struct inode *inode)
{
truncate_inode_pages_final(&inode->i_data);
clear_inode(inode); /* If we are holding a delegation, return and free it */
nfs_inode_evict_delegation(inode); /* Note that above delegreturn would trigger pnfs return-on-close */
pnfs_return_layout(inode);
pnfs_destroy_layout_final(NFS_I(inode)); /* First call standard NFS clear_inode() code */
nfs_clear_inode(inode);
nfs4_xattr_cache_zap(inode);
}
if (ctx->fscache_uniq) {
len = strlen(ctx->fscache_uniq);
param_fsc.size = len;
param_fsc.string = kmemdup_nul(ctx->fscache_uniq, len, GFP_KERNEL); if (param_fsc.string == NULL) {
put_fs_context(root_fc); return -ENOMEM;
}
ret = vfs_parse_fs_param(root_fc, ¶m_fsc);
kfree(param_fsc.string); if (ret < 0) {
put_fs_context(root_fc); return ret;
}
} /* We leave export_path unset as it's not used to find the root. */
len = strlen(hostname) + 5;
param.string = kmalloc(len, GFP_KERNEL); if (param.string == NULL) {
put_fs_context(root_fc); return -ENOMEM;
}
/* Does hostname needs to be enclosed in brackets? */ if (strchr(hostname, ':'))
param.size = snprintf(param.string, len, "[%s]:/", hostname); else
param.size = snprintf(param.string, len, "%s:/", hostname);
ret = vfs_parse_fs_param(root_fc, ¶m);
kfree(param.string); if (ret < 0) {
put_fs_context(root_fc); return ret;
}
root_mnt = fc_mount(root_fc);
put_fs_context(root_fc);
if (IS_ERR(root_mnt)) return PTR_ERR(root_mnt);
ret = nfs_referral_loop_protect(); if (ret) {
mntput(root_mnt); return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.