Home
last modified time | relevance | path

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

/linux-4.1.27/fs/gfs2/
Dglock.c62 static void do_xmote(struct gfs2_glock *gl, struct gfs2_holder *gh, unsigned int target);
249 static inline int may_grant(const struct gfs2_glock *gl, const struct gfs2_holder *gh) in may_grant() argument
252 if ((gh->gh_state == LM_ST_EXCLUSIVE || in may_grant()
253 gh_head->gh_state == LM_ST_EXCLUSIVE) && gh != gh_head) in may_grant()
255 if (gl->gl_state == gh->gh_state) in may_grant()
257 if (gh->gh_flags & GL_EXACT) in may_grant()
260 if (gh->gh_state == LM_ST_SHARED && gh_head->gh_state == LM_ST_SHARED) in may_grant()
262 if (gh->gh_state == LM_ST_DEFERRED && gh_head->gh_state == LM_ST_DEFERRED) in may_grant()
265 if (gl->gl_state != LM_ST_UNLOCKED && (gh->gh_flags & LM_FLAG_ANY)) in may_grant()
270 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_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_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()
609 struct gfs2_holder gh; in gfs2_readpages() local
612 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_readpages()
613 ret = gfs2_glock_nq(&gh); in gfs2_readpages()
618 gfs2_glock_dq(&gh); in gfs2_readpages()
620 gfs2_holder_uninit(&gh); in gfs2_readpages()
[all …]
Dglops.c277 struct gfs2_holder *gh; in inode_go_demote_ok() local
283 gh = list_entry(gl->gl_holders.next, struct gfs2_holder, gh_list); in inode_go_demote_ok()
284 if (gh->gh_list.next != &gl->gl_holders) in inode_go_demote_ok()
408 static int inode_go_lock(struct gfs2_holder *gh) in inode_go_lock() argument
410 struct gfs2_glock *gl = gh->gh_gl; in inode_go_lock()
415 if (!ip || (gh->gh_flags & GL_SKIP)) in inode_go_lock()
424 if (gh->gh_state != LM_ST_DEFERRED) in inode_go_lock()
429 (gh->gh_state == LM_ST_EXCLUSIVE)) { in inode_go_lock()
493 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()
1803 struct gfs2_holder gh; in gfs2_getattr() local
1808 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &gh); in gfs2_getattr()
1816 gfs2_glock_dq_uninit(&gh); in gfs2_getattr()
1826 struct gfs2_holder gh; in gfs2_setxattr() local
1829 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_setxattr()
1830 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);
39 extern void gfs2_rgrp_go_unlock(struct gfs2_holder *gh);
Dincore.h217 int (*go_xmote_bh) (struct gfs2_glock *gl, struct gfs2_holder *gh);
220 int (*go_lock) (struct gfs2_holder *gh);
221 void (*go_unlock) (struct gfs2_holder *gh);
Drgrp.c1236 int gfs2_rgrp_go_lock(struct gfs2_holder *gh) in gfs2_rgrp_go_lock() argument
1238 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_lock()
1241 if (gh->gh_flags & GL_SKIP && sdp->sd_args.ar_rgrplvb) in gfs2_rgrp_go_lock()
1252 void gfs2_rgrp_go_unlock(struct gfs2_holder *gh) in gfs2_rgrp_go_unlock() argument
1254 struct gfs2_rgrpd *rgd = gh->gh_gl->gl_object; in gfs2_rgrp_go_unlock()
1350 struct gfs2_holder gh; in gfs2_fitrim() local
1389 ret = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in gfs2_fitrim()
1401 gfs2_glock_dq_uninit(&gh); in gfs2_fitrim()
1418 gfs2_glock_dq_uninit(&gh); in gfs2_fitrim()
Dxattr.c1410 struct gfs2_holder gh; in ea_dealloc_block() local
1423 error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, &gh); in ea_dealloc_block()
1447 gfs2_glock_dq_uninit(&gh); in ea_dealloc_block()
/linux-4.1.27/net/ipv4/
Dgeneve.c145 static int geneve_hlen(struct genevehdr *gh) in geneve_hlen() argument
147 return sizeof(*gh) + gh->opt_len * 4; in geneve_hlen()
155 struct genevehdr *gh, *gh2; in geneve_gro_receive() local
162 hlen = off_gnv + sizeof(*gh); in geneve_gro_receive()
163 gh = skb_gro_header_fast(skb, off_gnv); in geneve_gro_receive()
165 gh = skb_gro_header_slow(skb, hlen, off_gnv); in geneve_gro_receive()
166 if (unlikely(!gh)) in geneve_gro_receive()
170 if (gh->ver != GENEVE_VER || gh->oam) in geneve_gro_receive()
172 gh_len = geneve_hlen(gh); in geneve_gro_receive()
176 gh = skb_gro_header_slow(skb, hlen, off_gnv); in geneve_gro_receive()
[all …]