Home
last modified time | relevance | path

Searched refs:gh (Results 1 – 14 of 14) sorted by relevance

/linux-4.4.14/fs/gfs2/
Dglock.c62 static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target);
188 static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holder *gh) in may_grant() argument
191 if ((gh->gh_state == LM_ST_EXCLUSIVE || in may_grant()
192 gh_head->gh_state == LM_ST_EXCLUSIVE) && gh != gh_head) in may_grant()
194 if (gl->gl_state == gh->gh_state) in may_grant()
196 if (gh->gh_flags & GL_EXACT) in may_grant()
199 if (gh->gh_state == LM_ST_SHARED && gh_head->gh_state == LM_ST_SHARED) in may_grant()
201 if (gh->gh_state == LM_ST_DEFERRED && gh_head->gh_state == LM_ST_DEFERRED) in may_grant()
204 if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY)) in may_grant()
209 static void gfs2_holder_wake(struct gfs2_holder *gh) in gfs2_holder_wake() argument
[all …]
Dglock.h140 struct gfs2_holder *gh; in gfs2_glock_is_locked_by_me() local
146 list_for_each_entry(gh, &gl->gl_holders, gh_list) { in gfs2_glock_is_locked_by_me()
147 if (!test_bit(HIF_HOLDER, &gh->gh_iflags)) in gfs2_glock_is_locked_by_me()
149 if (gh->gh_owner_pid == pid) in gfs2_glock_is_locked_by_me()
152 gh = NULL; in gfs2_glock_is_locked_by_me()
156 return gh; in gfs2_glock_is_locked_by_me()
186 unsigned flags, struct gfs2_holder *gh);
188 struct gfs2_holder *gh);
189 extern void gfs2_holder_uninit(struct gfs2_holder *gh);
190 extern int gfs2_glock_nq(struct gfs2_holder *gh);
[all …]
Dfile.c156 struct gfs2_holder gh; in gfs2_get_flags() local
160 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_get_flags()
161 error = gfs2_glock_nq(&gh); in gfs2_get_flags()
171 gfs2_glock_dq(&gh); in gfs2_get_flags()
172 gfs2_holder_uninit(&gh); in gfs2_get_flags()
218 struct gfs2_holder gh; in do_gfs2_set_flags() local
226 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in do_gfs2_set_flags()
282 gfs2_glock_dq_uninit(&gh); in do_gfs2_set_flags()
391 struct gfs2_holder gh; in gfs2_page_mkwrite() local
410 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_page_mkwrite()
[all …]
Dsuper.c476 struct gfs2_holder gh; in gfs2_statfs_init() local
480 &gh); in gfs2_statfs_init()
511 gfs2_glock_dq_uninit(&gh); in gfs2_statfs_init()
580 struct gfs2_holder gh; in gfs2_statfs_sync() local
586 &gh); in gfs2_statfs_sync()
621 gfs2_glock_dq_uninit(&gh); in gfs2_statfs_sync()
629 struct gfs2_holder gh; member
659 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &lfcc->gh); in gfs2_lock_fs_check_clean()
690 gfs2_glock_dq_uninit(&lfcc->gh); in gfs2_lock_fs_check_clean()
780 struct gfs2_holder gh; in gfs2_dirty_inode() local
[all …]
Dtrace_gfs2.h199 TP_PROTO(const struct gfs2_holder *gh, int first),
201 TP_ARGS(gh, first),
212 __entry->dev = gh->gh_gl->gl_name.ln_sbd->sd_vfs->s_dev;
213 __entry->glnum = gh->gh_gl->gl_name.ln_number;
214 __entry->gltype = gh->gh_gl->gl_name.ln_type;
216 __entry->state = glock_trace_state(gh->gh_state);
229 TP_PROTO(const struct gfs2_holder *gh, int queue),
231 TP_ARGS(gh, queue),
242 __entry->dev = gh->gh_gl->gl_name.ln_sbd->sd_vfs->s_dev;
243 __entry->glnum = gh->gh_gl->gl_name.ln_number;
[all …]
Daops.c528 struct gfs2_holder gh; in gfs2_readpage() local
532 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_readpage()
533 error = gfs2_glock_nq(&gh); in gfs2_readpage()
542 gfs2_glock_dq(&gh); in gfs2_readpage()
544 gfs2_holder_uninit(&gh); in gfs2_readpage()
613 struct gfs2_holder gh; in gfs2_readpages() local
616 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_readpages()
617 ret = gfs2_glock_nq(&gh); in gfs2_readpages()
622 gfs2_glock_dq(&gh); in gfs2_readpages()
624 gfs2_holder_uninit(&gh); in gfs2_readpages()
[all …]
Dglops.c287 struct gfs2_holder *gh; in inode_go_demote_ok() local
293 gh = list_entry(gl->gl_holders.next, struct gfs2_holder, gh_list); in inode_go_demote_ok()
294 if (gh->gh_list.next != &gl->gl_holders) in inode_go_demote_ok()
418 static int inode_go_lock(struct gfs2_holder *gh) in inode_go_lock() argument
420 struct gfs2_glock *gl = gh->gh_gl; in inode_go_lock()
425 if (!ip || (gh->gh_flags & GL_SKIP)) in inode_go_lock()
434 if (gh->gh_state != LM_ST_DEFERRED) in inode_go_lock()
439 (gh->gh_state == LM_ST_EXCLUSIVE)) { in inode_go_lock()
503 static int freeze_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh) in freeze_go_xmote_bh() argument
Dinode.c833 struct gfs2_holder gh; in __gfs2_lookup() local
846 error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in __gfs2_lookup()
854 gfs2_glock_dq_uninit(&gh); in __gfs2_lookup()
860 gfs2_glock_dq_uninit(&gh); in __gfs2_lookup()
1976 struct gfs2_holder gh; in gfs2_getattr() local
1981 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in gfs2_getattr()
1989 gfs2_glock_dq_uninit(&gh); in gfs2_getattr()
1999 struct gfs2_holder gh; in gfs2_setxattr() local
2002 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_setxattr()
2003 ret = gfs2_glock_nq(&gh); in gfs2_setxattr()
[all …]
Dexport.c98 struct gfs2_holder gh; in gfs2_get_name() local
115 error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_get_name()
121 gfs2_glock_dq_uninit(&gh); in gfs2_get_name()
Drgrp.h38 extern int gfs2_rgrp_go_lock(struct gfs2_holder *gh);
40 extern void gfs2_rgrp_go_unlock(struct gfs2_holder *gh);
Dincore.h220 int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh);
223 int (*go_lock) (struct gfs2_holder *gh);
224 void (*go_unlock) (struct gfs2_holder *gh);
Drgrp.c1237 int gfs2_rgrp_go_lock(struct gfs2_holder *gh) in gfs2_rgrp_go_lock() argument
1239 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_lock()
1242 if (gh->gh_flags & GL_SKIP && sdp->sd_args.ar_rgrplvb) in gfs2_rgrp_go_lock()
1273 void gfs2_rgrp_go_unlock(struct gfs2_holder *gh) in gfs2_rgrp_go_unlock() argument
1275 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_unlock()
1276 int demote_requested = test_bit(GLF_DEMOTE, &gh->gh_gl->gl_flags) | in gfs2_rgrp_go_unlock()
1277 test_bit(GLF_PENDING_DEMOTE, &gh->gh_gl->gl_flags); in gfs2_rgrp_go_unlock()
1366 struct gfs2_holder gh; in gfs2_fitrim() local
1405 ret = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_fitrim()
1417 gfs2_glock_dq_uninit(&gh); in gfs2_fitrim()
[all …]
Dxattr.c1413 struct gfs2_holder gh; in ea_dealloc_block() local
1426 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1450 gfs2_glock_dq_uninit(&gh); in ea_dealloc_block()
/linux-4.4.14/drivers/net/
Dgeneve.c382 static int geneve_hlen(struct genevehdr *gh) in geneve_hlen() argument
384 return sizeof(*gh) + gh->opt_len * 4; in geneve_hlen()
392 struct genevehdr *gh, *gh2; in geneve_gro_receive() local
399 hlen = off_gnv + sizeof(*gh); in geneve_gro_receive()
400 gh = skb_gro_header_fast(skb, off_gnv); in geneve_gro_receive()
402 gh = skb_gro_header_slow(skb, hlen, off_gnv); in geneve_gro_receive()
403 if (unlikely(!gh)) in geneve_gro_receive()
407 if (gh->ver != GENEVE_VER || gh->oam) in geneve_gro_receive()
409 gh_len = geneve_hlen(gh); in geneve_gro_receive()
413 gh = skb_gro_header_slow(skb, hlen, off_gnv); in geneve_gro_receive()
[all …]