Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23919
b: refs/heads/master
c: 0996905
h: refs/heads/master
i:
  23917: 3140aed
  23915: 15a0cfe
  23911: 21b5927
  23903: 16f545c
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 20, 2006
1 parent fdaef7a commit ab6dc60
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 3feb2d49394b7874348a6e43c076b780c1d222c5
refs/heads/master: 0996905f9301c2ff4c021982c42a15b35e74bf1c
18 changes: 13 additions & 5 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,17 +239,25 @@ static void locks_copy_private(struct file_lock *new, struct file_lock *fl)
/*
* Initialize a new lock from an existing file_lock structure.
*/
void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
static void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl)
{
locks_release_private(new);

new->fl_owner = fl->fl_owner;
new->fl_pid = fl->fl_pid;
new->fl_file = fl->fl_file;
new->fl_file = NULL;
new->fl_flags = fl->fl_flags;
new->fl_type = fl->fl_type;
new->fl_start = fl->fl_start;
new->fl_end = fl->fl_end;
new->fl_ops = NULL;
new->fl_lmops = NULL;
}

void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
{
locks_release_private(new);

__locks_copy_lock(new, fl);
new->fl_file = fl->fl_file;
new->fl_ops = fl->fl_ops;
new->fl_lmops = fl->fl_lmops;

Expand Down Expand Up @@ -686,7 +694,7 @@ posix_test_lock(struct file *filp, struct file_lock *fl,
break;
}
if (cfl) {
locks_copy_lock(conflock, cfl);
__locks_copy_lock(conflock, cfl);
unlock_kernel();
return 1;
}
Expand Down

0 comments on commit ab6dc60

Please sign in to comment.