aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-27 22:59:59 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-27 22:59:59 -0400
commit8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch)
treebe59573c0af3617d0cd8a7d61f0ed119e58b1156 /fs/locks.c
parentd2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff)
parent01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff)
Merge ../linux-2.6
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c
index b0b41a64e10b..d7c53392cac1 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1421,8 +1421,9 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
1421 if (!leases_enable) 1421 if (!leases_enable)
1422 goto out; 1422 goto out;
1423 1423
1424 error = lease_alloc(filp, arg, &fl); 1424 error = -ENOMEM;
1425 if (error) 1425 fl = locks_alloc_lock();
1426 if (fl == NULL)
1426 goto out; 1427 goto out;
1427 1428
1428 locks_copy_lock(fl, lease); 1429 locks_copy_lock(fl, lease);
@@ -1430,6 +1431,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
1430 locks_insert_lock(before, fl); 1431 locks_insert_lock(before, fl);
1431 1432
1432 *flp = fl; 1433 *flp = fl;
1434 error = 0;
1433out: 1435out:
1434 return error; 1436 return error;
1435} 1437}