Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210055
b: refs/heads/master
c: ad8453a
h: refs/heads/master
i:
  210053: 294fc2c
  210051: 5217720
  210047: 6461ab6
v: v3
  • Loading branch information
Alan Cox authored and Sage Weil committed Aug 25, 2010
1 parent f552fa7 commit 45b1c56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: ac1f12ef569d49b013c3db86e11be7e15d66b1c3
refs/heads/master: ad8453ab0a5b98884074302ba3cc37664791e261
14 changes: 9 additions & 5 deletions trunk/fs/ceph/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
length = fl->fl_end - fl->fl_start + 1;

err = ceph_lock_message(CEPH_LOCK_FCNTL, op, file,
(u64)fl->fl_pid, (u64)fl->fl_nspid,
(u64)fl->fl_pid,
(u64)(unsigned long)fl->fl_nspid,
lock_cmd, fl->fl_start,
length, wait);
if (!err) {
Expand All @@ -92,7 +93,8 @@ int ceph_lock(struct file *file, int cmd, struct file_lock *fl)
/* undo! This should only happen if the kernel detects
* local deadlock. */
ceph_lock_message(CEPH_LOCK_FCNTL, op, file,
(u64)fl->fl_pid, (u64)fl->fl_nspid,
(u64)fl->fl_pid,
(u64)(unsigned long)fl->fl_nspid,
CEPH_LOCK_UNLOCK, fl->fl_start,
length, 0);
dout("got %d on posix_lock_file, undid lock", err);
Expand Down Expand Up @@ -132,7 +134,8 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
length = fl->fl_end - fl->fl_start + 1;

err = ceph_lock_message(CEPH_LOCK_FLOCK, CEPH_MDS_OP_SETFILELOCK,
file, (u64)fl->fl_pid, (u64)fl->fl_nspid,
file, (u64)fl->fl_pid,
(u64)(unsigned long)fl->fl_nspid,
lock_cmd, fl->fl_start,
length, wait);
if (!err) {
Expand All @@ -141,7 +144,7 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl)
ceph_lock_message(CEPH_LOCK_FLOCK,
CEPH_MDS_OP_SETFILELOCK,
file, (u64)fl->fl_pid,
(u64)fl->fl_nspid,
(u64)(unsigned long)fl->fl_nspid,
CEPH_LOCK_UNLOCK, fl->fl_start,
length, 0);
dout("got %d on flock_lock_file_wait, undid lock", err);
Expand Down Expand Up @@ -235,7 +238,8 @@ int lock_to_ceph_filelock(struct file_lock *lock,
cephlock->length = cpu_to_le64(lock->fl_end - lock->fl_start + 1);
cephlock->client = cpu_to_le64(0);
cephlock->pid = cpu_to_le64(lock->fl_pid);
cephlock->pid_namespace = cpu_to_le64((u64)lock->fl_nspid);
cephlock->pid_namespace =
cpu_to_le64((u64)(unsigned long)lock->fl_nspid);

switch (lock->fl_type) {
case F_RDLCK:
Expand Down

0 comments on commit 45b1c56

Please sign in to comment.