Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55877
b: refs/heads/master
c: 129a84d
h: refs/heads/master
i:
  55875: a40be6f
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed May 11, 2007
1 parent 6a8affc commit 0518a24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: a9deecba19b8f384d97f82c75379da48bccb2588
refs/heads/master: 129a84de2347002f09721cda3155ccfd19fade40
5 changes: 3 additions & 2 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ posix_test_lock(struct file *filp, struct file_lock *fl)
{
struct file_lock *cfl;

fl->fl_type = F_UNLCK;
lock_kernel();
for (cfl = filp->f_path.dentry->d_inode->i_flock; cfl; cfl = cfl->fl_next) {
if (!IS_POSIX(cfl))
Expand All @@ -681,7 +680,8 @@ posix_test_lock(struct file *filp, struct file_lock *fl)
__locks_copy_lock(fl, cfl);
unlock_kernel();
return 1;
}
} else
fl->fl_type = F_UNLCK;
unlock_kernel();
return 0;
}
Expand Down Expand Up @@ -1632,6 +1632,7 @@ static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl)
flock->l_len = fl->fl_end == OFFSET_MAX ? 0 :
fl->fl_end - fl->fl_start + 1;
flock->l_whence = 0;
flock->l_type = fl->fl_type;
return 0;
}

Expand Down

0 comments on commit 0518a24

Please sign in to comment.