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;
}
/* * Clean out any remaining NFSv4 state that might be left over due * to open() calls that passed nfs_atomic_lookup, but failed to call * 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;
}
int nfs4_try_get_tree(struct fs_context *fc)
{ struct nfs_fs_context *ctx = nfs_fc2context(fc); int err;
dfprintk(MOUNT, "--> nfs4_try_get_tree()\n");
/* We create a mount for the server's root, walk to the requested * location and then create another mount for that.
*/
err= do_nfs4_mount(nfs4_create_server(fc),
fc, ctx->nfs_server.hostname,
ctx->nfs_server.export_path); if (err) {
nfs_ferrorf(fc, MOUNT, "NFS4: Couldn't follow remote path");
dfprintk(MOUNT, "<-- nfs4_try_get_tree() = %d [error]\n", err);
} else {
dfprintk(MOUNT, "<-- nfs4_try_get_tree() = 0\n");
} return err;
}
/* * Create an NFS4 server record on referral traversal
*/ int nfs4_get_referral_tree(struct fs_context *fc)
{ struct nfs_fs_context *ctx = nfs_fc2context(fc); int err;
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.