diff options
Diffstat (limited to 'fs/ceph/locks.c')
-rw-r--r-- | fs/ceph/locks.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index 191398852a2e..fbc39c47bacd 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c | |||
@@ -53,10 +53,7 @@ static int ceph_lock_message(u8 lock_type, u16 operation, struct file *file, | |||
53 | else | 53 | else |
54 | length = fl->fl_end - fl->fl_start + 1; | 54 | length = fl->fl_end - fl->fl_start + 1; |
55 | 55 | ||
56 | if (lock_type == CEPH_LOCK_FCNTL) | 56 | owner = secure_addr(fl->fl_owner); |
57 | owner = secure_addr(fl->fl_owner); | ||
58 | else | ||
59 | owner = secure_addr(fl->fl_file); | ||
60 | 57 | ||
61 | dout("ceph_lock_message: rule: %d, op: %d, owner: %llx, pid: %llu, " | 58 | dout("ceph_lock_message: rule: %d, op: %d, owner: %llx, pid: %llu, " |
62 | "start: %llu, length: %llu, wait: %d, type: %d", (int)lock_type, | 59 | "start: %llu, length: %llu, wait: %d, type: %d", (int)lock_type, |
@@ -314,10 +311,7 @@ int lock_to_ceph_filelock(struct file_lock *lock, | |||
314 | cephlock->length = cpu_to_le64(lock->fl_end - lock->fl_start + 1); | 311 | cephlock->length = cpu_to_le64(lock->fl_end - lock->fl_start + 1); |
315 | cephlock->client = cpu_to_le64(0); | 312 | cephlock->client = cpu_to_le64(0); |
316 | cephlock->pid = cpu_to_le64((u64)lock->fl_pid); | 313 | cephlock->pid = cpu_to_le64((u64)lock->fl_pid); |
317 | if (lock->fl_flags & FL_POSIX) | 314 | cephlock->owner = cpu_to_le64(secure_addr(lock->fl_owner)); |
318 | cephlock->owner = cpu_to_le64(secure_addr(lock->fl_owner)); | ||
319 | else | ||
320 | cephlock->owner = cpu_to_le64(secure_addr(lock->fl_file)); | ||
321 | 315 | ||
322 | switch (lock->fl_type) { | 316 | switch (lock->fl_type) { |
323 | case F_RDLCK: | 317 | case F_RDLCK: |