Lines Matching refs:fmode

1296 		fmode_t fmode, int openflags)  in nfs4_map_atomic_open_share()  argument
1300 switch (fmode & (FMODE_READ | FMODE_WRITE)) { in nfs4_map_atomic_open_share()
1349 struct nfs4_state_owner *sp, fmode_t fmode, int flags, in nfs4_opendata_alloc() argument
1383 p->o_arg.fmode = fmode & (FMODE_READ|FMODE_WRITE); in nfs4_opendata_alloc()
1386 fmode, flags); in nfs4_opendata_alloc()
1478 fmode_t fmode) in nfs4_mode_match_open_stateid() argument
1480 switch(fmode & (FMODE_READ|FMODE_WRITE)) { in nfs4_mode_match_open_stateid()
1523 static int can_open_delegated(struct nfs_delegation *delegation, fmode_t fmode, in can_open_delegated() argument
1528 if ((delegation->type & fmode) != fmode) in can_open_delegated()
1545 static void update_open_stateflags(struct nfs4_state *state, fmode_t fmode) in update_open_stateflags() argument
1547 switch (fmode) { in update_open_stateflags()
1557 nfs4_state_set_mode_locked(state, state->state | fmode); in update_open_stateflags()
1636 nfs4_stateid *stateid, fmode_t fmode) in nfs_clear_open_stateid_locked() argument
1639 switch (fmode & (FMODE_READ|FMODE_WRITE)) { in nfs_clear_open_stateid_locked()
1669 nfs4_stateid *stateid, fmode_t fmode) in nfs_clear_open_stateid() argument
1674 nfs_clear_open_stateid_locked(state, stateid, fmode); in nfs_clear_open_stateid()
1740 fmode_t fmode, in nfs_state_set_open_stateid() argument
1749 switch (fmode) { in nfs_state_set_open_stateid()
1773 fmode_t fmode) in nfs_state_set_delegation() argument
1796 fmode_t fmode) in update_open_stateid() argument
1805 fmode &= (FMODE_READ|FMODE_WRITE); in update_open_stateid()
1810 nfs_state_set_open_stateid(state, open_stateid, fmode, &freeme); in update_open_stateid()
1821 (deleg_cur->type & fmode) != fmode) in update_open_stateid()
1830 nfs_state_set_delegation(state, &deleg_cur->stateid, fmode); in update_open_stateid()
1836 update_open_stateflags(state, fmode); in update_open_stateid()
1867 static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmode) in nfs4_return_incompatible_delegation() argument
1871 fmode &= FMODE_READ|FMODE_WRITE; in nfs4_return_incompatible_delegation()
1874 if (delegation == NULL || (delegation->type & fmode) == fmode) { in nfs4_return_incompatible_delegation()
1887 fmode_t fmode = opendata->o_arg.fmode; in nfs4_try_open_cached() local
1894 if (can_open_cached(state, fmode, open_mode, claim)) { in nfs4_try_open_cached()
1895 update_open_stateflags(state, fmode); in nfs4_try_open_cached()
1902 if (!can_open_delegated(delegation, fmode, claim)) { in nfs4_try_open_cached()
1918 if (update_open_stateid(state, NULL, &stateid, fmode)) in nfs4_try_open_cached()
1995 NULL, data->o_arg.fmode)) in _nfs4_opendata_reclaim_to_nfs4_state()
2062 NULL, data->o_arg.fmode)) { in _nfs4_opendata_to_nfs4_state()
2134 fmode_t fmode) in nfs4_open_recover_helper() argument
2141 if (!nfs4_mode_match_open_stateid(opendata->state, fmode)) in nfs4_open_recover_helper()
2143 opendata->o_arg.fmode = fmode; in nfs4_open_recover_helper()
2145 nfs4_map_atomic_open_share(server, fmode, openflags); in nfs4_open_recover_helper()
2157 nfs4_close_state(newstate, fmode); in nfs4_open_recover_helper()
2372 nfs4_close_state(state, data->o_arg.fmode); in nfs4_open_confirm_release()
2441 if (can_open_cached(data->state, data->o_arg.fmode, in nfs4_open_prepare()
2446 if (can_open_delegated(delegation, data->o_arg.fmode, claim)) in nfs4_open_prepare()
2540 nfs4_close_state(state, data->o_arg.fmode); in nfs4_open_release()
2633 struct nfs4_state *state, fmode_t fmode, in nfs4_opendata_access() argument
2655 } else if ((fmode & FMODE_READ) && !opendata->file_created) in nfs4_opendata_access()
3136 fmode_t fmode = _nfs4_ctx_to_openmode(ctx); in _nfs4_do_open() local
3153 nfs4_return_incompatible_delegation(d_inode(dentry), fmode); in _nfs4_do_open()
3157 opendata = nfs4_opendata_alloc(dentry, sp, fmode, flags, in _nfs4_do_open()
3600 if (calldata->arg.fmode == 0) in nfs4_close_done()
3610 res_stateid, calldata->arg.fmode); in nfs4_close_done()
3642 calldata->arg.fmode = 0; in nfs4_close_prepare()
3647 calldata->arg.fmode |= FMODE_READ; in nfs4_close_prepare()
3651 calldata->arg.fmode |= FMODE_WRITE; in nfs4_close_prepare()
3652 if (calldata->arg.fmode != (FMODE_READ|FMODE_WRITE)) in nfs4_close_prepare()
3655 calldata->arg.fmode |= FMODE_READ|FMODE_WRITE; in nfs4_close_prepare()
3678 if (calldata->arg.fmode == 0) in nfs4_close_prepare()
3681 if (calldata->arg.fmode == 0 || calldata->arg.fmode == FMODE_READ) { in nfs4_close_prepare()
3694 calldata->arg.fmode, 0); in nfs4_close_prepare()
3771 calldata->arg.fmode = 0; in nfs4_do_close()
5359 fmode_t fmode) in nfs4_set_rw_stateid() argument
5361 return nfs4_select_rw_stateid(ctx->state, fmode, l_ctx, stateid, NULL); in nfs4_set_rw_stateid()
5368 fmode_t fmode) in nfs4_stateid_is_current() argument
5373 if (nfs4_set_rw_stateid(&_current_stateid, ctx, l_ctx, fmode) == -EIO) in nfs4_stateid_is_current()