Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33358
b: refs/heads/master
c: 74361cb
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Greg Kroah-Hartman committed Aug 14, 2006
1 parent b8369dd commit b2ef2ee
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 1d7ea7324ae7a59f8e17e4ba76a2707c1e6f24d2
refs/heads/master: 74361cb6828398a96167b3234e186fbd731e5f30
6 changes: 4 additions & 2 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,15 +1421,17 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
if (!leases_enable)
goto out;

error = lease_alloc(filp, arg, &fl);
if (error)
error = -ENOMEM;
fl = locks_alloc_lock();
if (fl == NULL)
goto out;

locks_copy_lock(fl, lease);

locks_insert_lock(before, fl);

*flp = fl;
error = 0;
out:
return error;
}
Expand Down

0 comments on commit b2ef2ee

Please sign in to comment.