Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376934
b: refs/heads/master
c: c420276
h: refs/heads/master
v: v3
  • Loading branch information
Jim Schutt authored and Alex Elder committed May 17, 2013
1 parent 6a8c0c1 commit 9dfaf9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 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: 14d2f38df67fadee34625fcbd282ee22514c4846
refs/heads/master: c420276a532a10ef59849adc2681f45306166b89
7 changes: 5 additions & 2 deletions trunk/fs/ceph/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,12 @@ int ceph_encode_locks(struct inode *inode, struct ceph_pagelist *pagelist,
int err = 0;
int seen_fcntl = 0;
int seen_flock = 0;
__le32 nlocks;

dout("encoding %d flock and %d fcntl locks", num_flock_locks,
num_fcntl_locks);
err = ceph_pagelist_append(pagelist, &num_fcntl_locks, sizeof(u32));
nlocks = cpu_to_le32(num_fcntl_locks);
err = ceph_pagelist_append(pagelist, &nlocks, sizeof(nlocks));
if (err)
goto fail;
for (lock = inode->i_flock; lock != NULL; lock = lock->fl_next) {
Expand All @@ -229,7 +231,8 @@ int ceph_encode_locks(struct inode *inode, struct ceph_pagelist *pagelist,
goto fail;
}

err = ceph_pagelist_append(pagelist, &num_flock_locks, sizeof(u32));
nlocks = cpu_to_le32(num_flock_locks);
err = ceph_pagelist_append(pagelist, &nlocks, sizeof(nlocks));
if (err)
goto fail;
for (lock = inode->i_flock; lock != NULL; lock = lock->fl_next) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
lock_flocks();
ceph_count_locks(inode, &num_fcntl_locks,
&num_flock_locks);
rec.v2.flock_len = (2*sizeof(u32) +
rec.v2.flock_len = cpu_to_le32(2*sizeof(u32) +
(num_fcntl_locks+num_flock_locks) *
sizeof(struct ceph_filelock));
unlock_flocks();
Expand Down

0 comments on commit 9dfaf9b

Please sign in to comment.