summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-01-15 10:38:07 +1300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-01-15 10:38:07 +1300
commitfb005c47f7b72edac50342b6af490af09854381b (patch)
tree45612e66ef8f56bd7c72b51bc4a30108b3344cad
parent31238e61b51f5a68bb8630ddb60ede475846d698 (diff)
parent52d304eb4eaced9ad04b64ba7cd6ceb5153bbf18 (diff)
Merge tag 'locks-v3.19-1' of git://git.samba.org/jlayton/linux
Pull file locking fix from Jeff Layton: "Just a simple bugfix for a regression that I introduced into v3.18 with the internal lease API overhaul -- mea culpa. Kudos to Linda and Neil for tracking this down and fixing it" * tag 'locks-v3.19-1' of git://git.samba.org/jlayton/linux: locks: fix NULL-deref in generic_delete_lease
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 735b8d3fa78c..59e2f905e4ff 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1702,7 +1702,7 @@ static int generic_delete_lease(struct file *filp)
break;
}
trace_generic_delete_lease(inode, fl);
- if (fl)
+ if (fl && IS_LEASE(fl))
error = fl->fl_lmops->lm_change(before, F_UNLCK, &dispose);
spin_unlock(&inode->i_lock);
locks_dispose_list(&dispose);