Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54454
b: refs/heads/master
c: f35ac34
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed May 1, 2007
1 parent b148e00 commit c51ea22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 254da030dfb1b13d42d07e4292a4790d88c6874f
refs/heads/master: f35ac346bc48b2086aa94f031baf1f6237a89de6
10 changes: 4 additions & 6 deletions trunk/fs/gfs2/locking/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static inline unsigned int make_flags(struct gdlm_lock *lp,

/* make_strname - convert GFS lock numbers to a string */

static inline void make_strname(struct lm_lockname *lockname,
static inline void make_strname(const struct lm_lockname *lockname,
struct gdlm_strname *str)
{
sprintf(str->name, "%8x%16llx", lockname->ln_type,
Expand All @@ -169,6 +169,7 @@ static int gdlm_create_lp(struct gdlm_ls *ls, struct lm_lockname *name,
return -ENOMEM;

lp->lockname = *name;
make_strname(name, &lp->strname);
lp->ls = ls;
lp->cur = DLM_LOCK_IV;
lp->lvb = NULL;
Expand Down Expand Up @@ -227,7 +228,6 @@ void gdlm_put_lock(void *lock)
unsigned int gdlm_do_lock(struct gdlm_lock *lp)
{
struct gdlm_ls *ls = lp->ls;
struct gdlm_strname str;
int error, bast = 1;

/*
Expand All @@ -249,17 +249,15 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp)
if (test_bit(LFL_NOBAST, &lp->flags))
bast = 0;

make_strname(&lp->lockname, &str);

set_bit(LFL_ACTIVE, &lp->flags);

log_debug("lk %x,%llx id %x %d,%d %x", lp->lockname.ln_type,
(unsigned long long)lp->lockname.ln_number, lp->lksb.sb_lkid,
lp->cur, lp->req, lp->lkf);

error = dlm_lock(ls->dlm_lockspace, lp->req, &lp->lksb, lp->lkf,
str.name, str.namelen, 0, gdlm_ast, lp,
bast ? gdlm_bast : NULL);
lp->strname.name, lp->strname.namelen, 0, gdlm_ast,
lp, bast ? gdlm_bast : NULL);

if ((error == -EAGAIN) && (lp->lkf & DLM_LKF_NOQUEUE)) {
lp->lksb.sb_status = -EAGAIN;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/locking/dlm/lock_dlm.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ enum {
struct gdlm_lock {
struct gdlm_ls *ls;
struct lm_lockname lockname;
struct gdlm_strname strname;
char *lvb;
struct dlm_lksb lksb;

Expand Down

0 comments on commit c51ea22

Please sign in to comment.