Lines Matching defs:inode
97 struct nfs_fattr *fattr, struct inode *inode);
98 static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
114 nfs4_label_init_security(struct inode *dir, struct dentry *dentry,
153 nfs4_label_init_security(struct inode *dir, struct dentry *dentry,
291 struct inode *inode, unsigned long flags)
296 if (!inode || !nfs4_have_delegation(inode, FMODE_READ))
299 cache_validity = READ_ONCE(NFS_I(inode)->cache_validity) | flags;
475 struct inode *inode = exception->inode;
491 if (inode != NULL && S_ISREG(inode->i_mode))
492 pnfs_destroy_layout(NFS_I(inode));
499 if (inode != NULL && stateid != NULL) {
500 nfs_inode_find_state_and_recover(inode,
506 if (inode) {
509 err = nfs_async_inode_return_delegation(inode,
1190 nfs4_inc_nlink_locked(struct inode *inode)
1192 nfs_set_cache_invalid(inode, NFS_INO_INVALID_CHANGE |
1195 inc_nlink(inode);
1199 nfs4_inc_nlink(struct inode *inode)
1201 spin_lock(&inode->i_lock);
1202 nfs4_inc_nlink_locked(inode);
1203 spin_unlock(&inode->i_lock);
1207 nfs4_dec_nlink_locked(struct inode *inode)
1209 nfs_set_cache_invalid(inode, NFS_INO_INVALID_CHANGE |
1212 drop_nlink(inode);
1216 nfs4_update_changeattr_locked(struct inode *inode,
1220 struct nfs_inode *nfsi = NFS_I(inode);
1221 u64 change_attr = inode_peek_iversion_raw(inode);
1224 if (S_ISDIR(inode->i_mode))
1227 switch (NFS_SERVER(inode)->change_attr_type) {
1237 inode_set_iversion_raw(inode, cinfo->after);
1239 if (S_ISDIR(inode->i_mode))
1240 nfs_force_lookup_revalidate(inode);
1242 if (!NFS_PROTO(inode)->have_delegation(inode, FMODE_READ))
1248 nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
1255 nfs_set_cache_invalid(inode, cache_validity);
1259 nfs4_update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo,
1358 struct inode *dir = d_inode(parent);
1665 trace_nfs4_open_stateid_update(state->inode, stateid, 0);
1700 if (!nfs4_has_session(NFS_SERVER(state->inode)->nfs_client))
1713 trace_nfs4_open_stateid_update_wait(state->inode, stateid, 0);
1737 trace_nfs4_open_stateid_update(state->inode, stateid, status);
1801 struct nfs_server *server = NFS_SERVER(state->inode);
1803 struct nfs_inode *nfsi = NFS_I(state->inode);
1817 deleg_cur = nfs4_get_valid_delegation(state->inode);
1870 static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmode)
1876 delegation = nfs4_get_valid_delegation(inode);
1882 nfs4_inode_return_delegation(inode);
1904 delegation = nfs4_get_valid_delegation(state->inode);
1914 ret = nfs_may_open(state->inode, state->owner->so_cred, open_mode);
1934 struct nfs_client *clp = NFS_SERVER(state->inode)->nfs_client;
1939 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
1955 nfs_inode_set_delegation(state->inode,
1961 nfs_inode_reclaim_delegation(state->inode,
1968 nfs_async_inode_return_delegation(state->inode,
1973 * Check the inode attributes against the CLAIM_PREVIOUS returned attributes
1979 struct inode *inode = data->state->inode;
1989 ret = nfs_refresh_inode(inode, &data->f_attr);
2004 static struct inode *
2007 struct inode *inode;
2015 inode = nfs_fhget(data->dir->d_sb, &data->o_res.fh,
2019 inode = d_inode(data->dentry);
2020 ihold(inode);
2021 nfs_refresh_inode(inode, &data->f_attr);
2023 return inode;
2030 struct inode *inode;
2032 inode = nfs4_opendata_get_inode(data);
2033 if (IS_ERR(inode))
2034 return ERR_CAST(inode);
2035 if (data->state != NULL && data->state->inode == inode) {
2039 state = nfs4_get_open_state(inode, data->owner);
2040 iput(inode);
2089 struct nfs_inode *nfsi = NFS_I(state->inode);
2208 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2220 struct nfs_server *server = NFS_SERVER(state->inode);
2285 nfs_inode_find_state_and_recover(state->inode,
2308 struct nfs_server *server = NFS_SERVER(state->inode);
2447 delegation = nfs4_get_valid_delegation(data->state->inode);
2556 struct inode *dir = d_inode(data->dir);
2609 struct inode *dir = d_inode(data->dir);
2648 if (S_ISDIR(state->inode->i_mode))
2656 nfs_access_add_cache(state->inode, &cache, cred);
2671 struct inode *dir = d_inode(data->dir);
2746 struct nfs_server *server = NFS_SERVER(state->inode);
2784 nfs_remove_bad_delegation(state->inode, stateid);
2790 if (rcu_access_pointer(NFS_I(state->inode)->delegation) != NULL)
2843 struct nfs_server *server = NFS_SERVER(state->inode);
2851 delegation = rcu_dereference(NFS_I(state->inode)->delegation);
2888 nfs4_copy_delegation_stateid(state->inode, state->state,
2899 * @state: NFSv4 state for an inode
2908 struct nfs_server *server = NFS_SERVER(state->inode);
2951 * @state: NFSv4 state for an inode
2958 struct nfs_server *server = NFS_SERVER(state->inode);
3045 struct inode *dir = d_inode(opendata->dir);
3067 set_bit(NFS_INO_PRESERVE_UNLINKED, &NFS_I(state->inode)->flags);
3073 alias = d_exact_alias(dentry, state->inode);
3075 alias = d_splice_alias(igrab(state->inode), dentry);
3097 pnfs_parse_lgopen(state->inode, opendata->lgp, ctx);
3103 if (d_inode(dentry) == state->inode) {
3123 static int _nfs4_do_open(struct inode *dir,
3190 status = nfs4_do_setattr(state->inode, cred,
3194 nfs_setattr_update_inode(state->inode, sattr,
3196 nfs_setsecurity(state->inode, opendata->o_res.f_attr);
3221 static struct nfs4_state *nfs4_do_open(struct inode *dir,
3295 static int _nfs4_do_setattr(struct inode *inode,
3301 struct nfs_server *server = NFS_SERVER(inode);
3318 nfs4_inode_make_writeable(inode);
3322 if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) {
3350 trace_nfs4_setattr(inode, &arg->stateid, status);
3354 static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
3358 struct nfs_server *server = NFS_SERVER(inode);
3362 .fh = NFS_FH(inode),
3374 .inode = inode,
3387 inode, adjust_flags);
3389 err = _nfs4_do_setattr(inode, &arg, &res, cred, ctx);
3413 nfs4_wait_on_layoutreturn(struct inode *inode, struct rpc_task *task)
3415 if (inode == NULL || !nfs_have_layout(inode))
3418 return pnfs_wait_on_layoutreturn(inode, task);
3493 trace_nfs4_close_stateid_update_wait(state->inode, dst, 0);
3518 struct inode *inode;
3537 struct super_block *sb = calldata->state->inode->i_sb;
3553 struct nfs_server *server = NFS_SERVER(calldata->inode);
3557 .inode = calldata->inode,
3570 /* hmm. we are done with the inode, and in the process of freeing
3614 nfs_refresh_inode(calldata->inode, &calldata->fattr);
3627 struct inode *inode = calldata->inode;
3628 struct nfs_server *server = NFS_SERVER(inode);
3667 if (!calldata->lr.roc && nfs4_wait_on_layoutreturn(inode, task)) {
3683 if (!nfs4_have_delegation(inode, FMODE_READ)) {
3686 inode, 0);
3693 nfs4_map_atomic_open_share(NFS_SERVER(inode),
3701 if (nfs4_setup_sequence(NFS_SERVER(inode)->nfs_client,
3723 * the inode is cleared. This in turn means that we are not good
3726 * stateid's in the inode.
3732 struct nfs_server *server = NFS_SERVER(state->inode);
3750 if (nfs_server_capable(state->inode, NFS_CAP_MOVEABLE))
3760 calldata->inode = state->inode;
3762 calldata->arg.fh = NFS_FH(state->inode);
3777 calldata->lr.roc = pnfs_roc(state->inode,
3783 nfs_sb_active(calldata->inode->i_sb);
3804 static struct inode *
3805 nfs4_atomic_open(struct inode *dir, struct nfs_open_context *ctx,
3820 return state->inode;
4252 * we detect fsid mismatch in inode revalidation
4254 static int nfs4_get_referral(struct rpc_clnt *client, struct inode *dir,
4297 struct nfs_fattr *fattr, struct inode *inode)
4319 if (inode && (server->flags & NFS_MOUNT_SOFTREVAL))
4322 nfs4_bitmap_copy_adjust(bitmask, nfs4_bitmask(server, fattr->label), inode, 0);
4330 struct nfs_fattr *fattr, struct inode *inode)
4337 err = _nfs4_proc_getattr(server, fhandle, fattr, inode);
4350 * Close is called when the inode is destroyed.
4366 struct inode *inode = d_inode(dentry);
4371 if (pnfs_ld_layoutret_on_setattr(inode) &&
4373 sattr->ia_size < i_size_read(inode))
4374 pnfs_commit_and_return_layout(inode);
4396 nfs4_inode_make_writeable(inode);
4398 status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL);
4400 nfs_setattr_update_inode(inode, sattr, fattr);
4401 nfs_setsecurity(inode, fattr);
4406 static int _nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir,
4456 static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir,
4502 static int nfs4_proc_lookup(struct inode *dir, struct dentry *dentry,
4517 nfs4_proc_lookup_mountpoint(struct inode *dir, struct dentry *dentry,
4529 static int _nfs4_proc_lookupp(struct inode *inode,
4532 struct rpc_clnt *clnt = NFS_CLIENT(inode);
4533 struct nfs_server *server = NFS_SERVER(inode);
4537 .fh = NFS_FH(inode),
4551 if (NFS_SERVER(inode)->flags & NFS_MOUNT_SOFTREVAL)
4558 dprintk("NFS call lookupp ino=0x%lx\n", inode->i_ino);
4565 static int nfs4_proc_lookupp(struct inode *inode, struct nfs_fh *fhandle,
4573 err = _nfs4_proc_lookupp(inode, fhandle, fattr);
4574 trace_nfs4_lookupp(inode, err);
4575 err = nfs4_handle_exception(NFS_SERVER(inode), err,
4581 static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry,
4584 struct nfs_server *server = NFS_SERVER(inode);
4586 .fh = NFS_FH(inode),
4600 if (!nfs4_have_delegation(inode, FMODE_READ)) {
4610 nfs_refresh_inode(inode, res.fattr);
4616 static int nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry,
4624 err = _nfs4_proc_access(inode, entry, cred);
4625 trace_nfs4_access(inode, err);
4626 err = nfs4_handle_exception(NFS_SERVER(inode), err,
4654 static int _nfs4_proc_readlink(struct inode *inode, struct page *page,
4658 .fh = NFS_FH(inode),
4670 return nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode), &msg, &args.seq_args, &res.seq_res, 0);
4673 static int nfs4_proc_readlink(struct inode *inode, struct page *page,
4681 err = _nfs4_proc_readlink(inode, page, pgbase, pglen);
4682 trace_nfs4_readlink(inode, err);
4683 err = nfs4_handle_exception(NFS_SERVER(inode), err,
4693 nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
4722 _nfs4_proc_remove(struct inode *dir, const struct qstr *name, u32 ftype)
4753 static int nfs4_proc_remove(struct inode *dir, struct dentry *dentry)
4758 struct inode *inode = d_inode(dentry);
4761 if (inode) {
4762 if (inode->i_nlink == 1)
4763 nfs4_inode_return_delegation(inode);
4765 nfs4_inode_make_writeable(inode);
4776 static int nfs4_proc_rmdir(struct inode *dir, const struct qstr *name)
4794 struct inode *inode)
4805 if (inode) {
4806 nfs4_inode_return_delegation(inode);
4807 nfs_d_prune_case_insensitive_aliases(inode);
4819 static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
4842 struct inode *old_inode = d_inode(old_dentry);
4843 struct inode *new_inode = d_inode(new_dentry);
4862 static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
4863 struct inode *new_dir)
4893 static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
4895 struct nfs_server *server = NFS_SERVER(inode);
4898 .fh = NFS_FH(inode),
4917 nfs4_inode_make_writeable(inode);
4918 nfs4_bitmap_copy_adjust(bitmask, nfs4_bitmask(server, res.fattr->label), inode,
4924 nfs4_inc_nlink(inode);
4925 status = nfs_post_op_update_inode(inode, res.fattr);
4927 nfs_setsecurity(inode, res.fattr);
4935 static int nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name)
4942 err = nfs4_handle_exception(NFS_SERVER(inode),
4943 _nfs4_proc_link(inode, dir, name),
4957 static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir,
4991 static int nfs4_do_create(struct inode *dir, struct dentry *dentry, struct nfs4_createdata *data)
5015 static int _nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
5042 static int nfs4_proc_symlink(struct inode *dir, struct dentry *dentry,
5064 static int _nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
5082 static int nfs4_proc_mkdir(struct inode *dir, struct dentry *dentry,
5110 struct inode *dir = d_inode(nr_arg->dentry);
5166 static int _nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
5201 static int nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
5395 struct nfs_server *server = NFS_SERVER(hdr->inode);
5400 .inode = hdr->inode,
5434 struct nfs_server *server = NFS_SERVER(hdr->inode);
5456 nfs_invalidate_atime(hdr->inode);
5466 if (nfs_server_capable(hdr->inode, NFS_CAP_READ_PLUS) && !hdr->ds_clp) {
5494 if (nfs4_setup_sequence(NFS_SERVER(hdr->inode)->nfs_client,
5511 struct inode *inode = hdr->inode;
5516 .inode = hdr->inode,
5521 NFS_SERVER(inode), task->tk_status,
5529 renew_lease(NFS_SERVER(inode), hdr->timestamp);
5568 return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0;
5572 struct inode *inode, unsigned long cache_validity)
5574 struct nfs_server *server = NFS_SERVER(inode);
5578 cache_validity |= READ_ONCE(NFS_I(inode)->cache_validity);
5608 struct nfs_server *server = NFS_SERVER(hdr->inode);
5616 hdr->inode, NFS_INO_INVALID_BLOCKS);
5632 nfs4_setup_sequence(NFS_SERVER(data->inode)->nfs_client,
5640 struct inode *inode = data->inode;
5643 if (nfs4_async_handle_error(task, NFS_SERVER(inode),
5661 struct nfs_server *server = NFS_SERVER(data->inode);
5675 struct inode *dst_inode = file_inode(dst);
5853 static void nfs4_set_cached_acl(struct inode *inode, struct nfs4_cached_acl *acl)
5855 struct nfs_inode *nfsi = NFS_I(inode);
5857 spin_lock(&inode->i_lock);
5860 spin_unlock(&inode->i_lock);
5863 static void nfs4_zap_acl_attr(struct inode *inode)
5865 nfs4_set_cached_acl(inode, NULL);
5868 static ssize_t nfs4_read_cached_acl(struct inode *inode, char *buf,
5871 struct nfs_inode *nfsi = NFS_I(inode);
5875 spin_lock(&inode->i_lock);
5892 spin_unlock(&inode->i_lock);
5896 static void nfs4_write_cached_acl(struct inode *inode, struct page **pages,
5918 nfs4_set_cached_acl(inode, acl);
5931 static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf,
5936 .fh = NFS_FH(inode),
5951 struct nfs_server *server = NFS_SERVER(inode);
5978 ret = nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode),
5991 nfs4_write_cached_acl(inode, pages, res.acl_data_offset, res.acl_len,
6011 static ssize_t nfs4_get_acl_uncached(struct inode *inode, void *buf,
6019 ret = __nfs4_get_acl_uncached(inode, buf, buflen, type);
6020 trace_nfs4_get_acl(inode, ret);
6023 ret = nfs4_handle_exception(NFS_SERVER(inode), ret, &exception);
6028 static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen,
6031 struct nfs_server *server = NFS_SERVER(inode);
6036 ret = nfs_revalidate_inode(inode, NFS_INO_INVALID_CHANGE);
6039 if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_ACL)
6040 nfs_zap_acl_cache(inode);
6041 ret = nfs4_read_cached_acl(inode, buf, buflen, type);
6046 return nfs4_get_acl_uncached(inode, buf, buflen, type);
6049 static int __nfs4_proc_set_acl(struct inode *inode, const void *buf,
6052 struct nfs_server *server = NFS_SERVER(inode);
6055 .fh = NFS_FH(inode),
6079 nfs4_inode_make_writeable(inode);
6090 * Acl update can result in inode attribute update.
6093 spin_lock(&inode->i_lock);
6094 nfs_set_cache_invalid(inode, NFS_INO_INVALID_CHANGE |
6097 spin_unlock(&inode->i_lock);
6098 nfs_access_zap_cache(inode);
6099 nfs_zap_acl_cache(inode);
6103 static int nfs4_proc_set_acl(struct inode *inode, const void *buf,
6109 err = __nfs4_proc_set_acl(inode, buf, buflen, type);
6110 trace_nfs4_set_acl(inode, err);
6119 err = nfs4_handle_exception(NFS_SERVER(inode), err,
6126 static int _nfs4_get_security_label(struct inode *inode, void *buf,
6129 struct nfs_server *server = NFS_SERVER(inode);
6137 .fh = NFS_FH(inode),
6161 static int nfs4_get_security_label(struct inode *inode, void *buf,
6169 if (!nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL))
6173 err = _nfs4_get_security_label(inode, buf, buflen);
6174 trace_nfs4_get_security_label(inode, err);
6175 err = nfs4_handle_exception(NFS_SERVER(inode), err,
6181 static int _nfs4_do_set_security_label(struct inode *inode,
6187 struct nfs_server *server = NFS_SERVER(inode);
6190 .fh = NFS_FH(inode),
6216 static int nfs4_do_set_security_label(struct inode *inode,
6224 err = _nfs4_do_set_security_label(inode, ilabel, fattr);
6225 trace_nfs4_set_security_label(inode, err);
6226 err = nfs4_handle_exception(NFS_SERVER(inode), err,
6233 nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
6239 if (!nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL))
6242 fattr = nfs_alloc_fattr_with_label(NFS_SERVER(inode));
6246 status = nfs4_do_set_security_label(inode, &ilabel, fattr);
6248 nfs_setsecurity(inode, fattr);
6537 struct inode *inode;
6544 .inode = data->inode,
6576 if (!nfs4_refresh_delegation_stateid(&data->stateid, data->inode))
6597 nfs_delegation_mark_returned(data->inode, data->args.stateid);
6608 struct inode *inode = data->inode;
6613 if (inode) {
6615 inode_peek_iversion_raw(inode));
6616 nfs_refresh_inode(inode, &data->fattr);
6617 nfs_iput_and_deactive(inode);
6629 if (!d_data->lr.roc && nfs4_wait_on_layoutreturn(d_data->inode, task)) {
6652 static int _nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred, const nfs4_stateid *stateid, int issync)
6655 struct nfs_server *server = NFS_SERVER(inode);
6669 if (nfs_server_capable(inode, NFS_CAP_MOVEABLE))
6683 server->cache_consistency_bitmask, inode, 0);
6685 nfs_copy_fh(&data->fh, NFS_FH(inode));
6694 data->inode = nfs_igrab_and_active(inode);
6695 if (data->inode || issync) {
6696 data->lr.roc = pnfs_roc(inode, &data->lr.arg, &data->lr.res,
6704 if (!data->inode)
6727 int nfs4_proc_delegreturn(struct inode *inode, const struct cred *cred, const nfs4_stateid *stateid, int issync)
6729 struct nfs_server *server = NFS_SERVER(inode);
6733 err = _nfs4_proc_delegreturn(inode, cred, stateid, issync);
6734 trace_nfs4_delegreturn(inode, stateid, err);
6748 struct inode *inode = state->inode;
6749 struct nfs_server *server = NFS_SERVER(inode);
6752 .fh = NFS_FH(inode),
6798 err = nfs4_handle_exception(NFS_SERVER(state->inode), err,
6858 struct inode *inode = state->inode;
6863 p->arg.fh = NFS_FH(inode);
6873 p->server = NFS_SERVER(inode);
6894 .inode = calldata->lsp->ls_state->inode,
6903 locks_lock_inode_wait(calldata->lsp->ls_state->inode, &calldata->fl);
6979 .rpc_client = NFS_CLIENT(lsp->ls_state->inode),
6986 if (nfs_server_capable(lsp->ls_state->inode, NFS_CAP_MOVEABLE))
6989 nfs4_state_protect(NFS_SERVER(lsp->ls_state->inode)->nfs_client,
7014 struct inode *inode = state->inode;
7016 struct nfs_inode *nfsi = NFS_I(inode);
7031 if (locks_lock_inode_wait(inode, request) == -ENOENT) {
7045 alloc_seqid = NFS_SERVER(inode)->nfs_client->cl_mvops->alloc_seqid;
7079 struct inode *inode = lsp->ls_state->inode;
7080 struct nfs_server *server = NFS_SERVER(inode);
7087 p->arg.fh = NFS_FH(inode);
7169 if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0)
7258 .rpc_client = NFS_CLIENT(state->inode),
7266 if (nfs_server_capable(state->inode, NFS_CAP_MOVEABLE))
7304 struct nfs_server *server = NFS_SERVER(state->inode);
7306 .inode = state->inode,
7324 struct nfs_server *server = NFS_SERVER(state->inode);
7326 .inode = state->inode,
7373 struct nfs_inode *nfsi = NFS_I(state->inode);
7379 status = locks_lock_inode_wait(state->inode, request);
7388 status = locks_lock_inode_wait(state->inode, request);
7405 .inode = state->inode,
7414 err = nfs4_handle_exception(NFS_SERVER(state->inode),
7445 struct inode *inode;
7466 /* Make sure it's for the right inode */
7467 if (nfs_compare_fh(NFS_FH(waiter->inode), &cbnl->cbnl_fh))
7478 struct nfs_server *server = NFS_SERVER(state->inode);
7482 .inode = state->inode,
7581 struct inode *inode = file_inode(file);
7586 if (!nfs4_have_delegation(inode, type))
7589 if (ret || nfs4_have_delegation(inode, type))
7612 struct nfs_server *server = NFS_SERVER(state->inode);
7711 struct dentry *unused, struct inode *inode,
7715 return nfs4_proc_set_acl(inode, buf, buflen, NFS4ACL_ACL);
7719 struct dentry *unused, struct inode *inode,
7722 return nfs4_proc_get_acl(inode, buf, buflen, NFS4ACL_ACL);
7735 struct dentry *unused, struct inode *inode,
7739 return nfs4_proc_set_acl(inode, buf, buflen, NFS4ACL_DACL);
7743 struct dentry *unused, struct inode *inode,
7746 return nfs4_proc_get_acl(inode, buf, buflen, NFS4ACL_DACL);
7758 struct dentry *unused, struct inode *inode,
7762 return nfs4_proc_set_acl(inode, buf, buflen, NFS4ACL_SACL);
7766 struct dentry *unused, struct inode *inode,
7769 return nfs4_proc_get_acl(inode, buf, buflen, NFS4ACL_SACL);
7783 struct dentry *unused, struct inode *inode,
7788 return nfs4_set_security_label(inode, buf, buflen);
7794 struct dentry *unused, struct inode *inode,
7798 return nfs4_get_security_label(inode, buf, buflen);
7803 nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
7807 if (nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL)) {
7808 len = security_inode_listsecurity(inode, list, list_len);
7824 nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
7834 struct dentry *unused, struct inode *inode,
7841 if (!nfs_server_capable(inode, NFS_CAP_XATTR))
7853 if (!nfs_access_get_cached(inode, current_cred(), &mask, true)) {
7859 ret = nfs42_proc_removexattr(inode, key);
7861 nfs4_xattr_cache_remove(inode, key);
7863 ret = nfs42_proc_setxattr(inode, key, buf, buflen, flags);
7865 nfs4_xattr_cache_add(inode, key, buf, NULL, buflen);
7872 struct dentry *unused, struct inode *inode,
7878 if (!nfs_server_capable(inode, NFS_CAP_XATTR))
7881 if (!nfs_access_get_cached(inode, current_cred(), &mask, true)) {
7886 ret = nfs_revalidate_inode(inode, NFS_INO_INVALID_CHANGE);
7890 ret = nfs4_xattr_cache_get(inode, key, buf, buflen);
7894 ret = nfs42_proc_getxattr(inode, key, buf, buflen);
7900 nfs4_listxattr_nfs4_user(struct inode *inode, char *list, size_t list_len)
7909 if (!nfs_server_capable(inode, NFS_CAP_XATTR))
7912 if (!nfs_access_get_cached(inode, current_cred(), &mask, true)) {
7917 ret = nfs_revalidate_inode(inode, NFS_INO_INVALID_CHANGE);
7921 ret = nfs4_xattr_cache_list(inode, list, list_len);
7932 ret = nfs42_proc_listxattrs(inode, buf, buflen,
7945 nfs4_xattr_cache_set_list(inode, list, size);
7953 nfs4_listxattr_nfs4_user(struct inode *inode, char *list, size_t list_len)
7976 static int _nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
8019 int nfs4_proc_fs_locations(struct rpc_clnt *client, struct inode *dir,
8209 static int _nfs40_proc_fsid_present(struct inode *inode, const struct cred *cred)
8211 struct nfs_server *server = NFS_SERVER(inode);
8212 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
8215 .fh = NFS_FH(inode),
8255 static int _nfs41_proc_fsid_present(struct inode *inode, const struct cred *cred)
8257 struct nfs_server *server = NFS_SERVER(inode);
8260 .fh = NFS_FH(inode),
8290 * @inode: inode on FSID to check
8302 int nfs4_proc_fsid_present(struct inode *inode, const struct cred *cred)
8304 struct nfs_server *server = NFS_SERVER(inode);
8317 nfs_display_fhandle(NFS_FH(inode), __func__);
8320 status = ops->fsid_present(inode, cred);
8335 static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors, bool use_integrity)
8386 int nfs4_proc_secinfo(struct inode *dir, const struct qstr *name,
9604 struct nfs_server *server = NFS_SERVER(lgp->args.inode);
9621 struct inode *inode = lgp->args.inode;
9622 struct nfs_server *server = NFS_SERVER(inode);
9675 spin_lock(&inode->i_lock);
9679 spin_unlock(&inode->i_lock);
9689 spin_unlock(&inode->i_lock);
9690 nfs_commit_inode(inode, 0);
9730 struct inode *inode = lgp->args.inode;
9731 struct nfs_server *server = NFS_SERVER(inode);
9749 .inode = inode,
9816 server = NFS_SERVER(lrp->args.inode);
9821 lrp->args.inode))
9852 nfs_iput_and_deactive(lrp->inode);
9873 .rpc_client = NFS_SERVER(lrp->args.inode)->client,
9881 nfs4_state_protect(NFS_SERVER(lrp->args.inode)->nfs_client,
9885 lrp->inode = nfs_igrab_and_active(lrp->args.inode);
9887 if (!lrp->inode) {
9893 if (!lrp->inode)
9904 trace_nfs4_layoutreturn(lrp->args.inode, &lrp->args.stateid, status);
9963 struct nfs_server *server = NFS_SERVER(data->args.inode);
9975 struct nfs_server *server = NFS_SERVER(data->args.inode);
10002 nfs_post_op_update_inode_force_wcc(data->args.inode,
10005 nfs_iput_and_deactive(data->inode);
10026 .rpc_client = NFS_CLIENT(data->args.inode),
10036 "lbw: %llu inode %lu\n", sync,
10038 data->args.inode->i_ino);
10041 data->inode = nfs_igrab_and_active(data->args.inode);
10042 if (data->inode == NULL) {
10054 trace_nfs4_layoutcommit(data->args.inode, &data->args.stateid, status);
10619 static void nfs4_enable_swap(struct inode *inode)
10624 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;
10629 static void nfs4_disable_swap(struct inode *inode)
10634 struct nfs_client *clp = NFS_SERVER(inode)->nfs_client;