Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61452
b: refs/heads/master
c: 6d34ac1
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Jul 18, 2007
1 parent dc0ae00 commit a27055d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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: 370f6599e8bc03fd9fc6d1a1be00ae0c6373ca59
refs/heads/master: 6d34ac199a4af5c678a3a8f3275aeb2586b72da3
10 changes: 4 additions & 6 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static int locks_block_on_timeout(struct file_lock *blocker, struct file_lock *w
return result;
}

int
void
posix_test_lock(struct file *filp, struct file_lock *fl)
{
struct file_lock *cfl;
Expand All @@ -671,14 +671,12 @@ posix_test_lock(struct file *filp, struct file_lock *fl)
if (posix_locks_conflict(cfl, fl))
break;
}
if (cfl) {
if (cfl)
__locks_copy_lock(fl, cfl);
unlock_kernel();
return 1;
} else
else
fl->fl_type = F_UNLCK;
unlock_kernel();
return 0;
return;
}

EXPORT_SYMBOL(posix_test_lock);
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,9 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)

lock_kernel();
/* Try local locking first */
if (posix_test_lock(filp, fl)) {
posix_test_lock(filp, fl);
if (fl->fl_type != F_UNLCK) {
/* found a conflict */
goto out;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ extern void locks_init_lock(struct file_lock *);
extern void locks_copy_lock(struct file_lock *, struct file_lock *);
extern void locks_remove_posix(struct file *, fl_owner_t);
extern void locks_remove_flock(struct file *);
extern int posix_test_lock(struct file *, struct file_lock *);
extern void posix_test_lock(struct file *, struct file_lock *);
extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
extern int posix_lock_file_wait(struct file *, struct file_lock *);
extern int posix_unblock_lock(struct file *, struct file_lock *);
Expand Down

0 comments on commit a27055d

Please sign in to comment.