aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 3fa6a7ce57a7..a0bc03495bd4 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1548,6 +1548,8 @@ int fcntl_getlk(struct file *filp, struct flock __user *l)
1548 1548
1549 if (filp->f_op && filp->f_op->lock) { 1549 if (filp->f_op && filp->f_op->lock) {
1550 error = filp->f_op->lock(filp, F_GETLK, &file_lock); 1550 error = filp->f_op->lock(filp, F_GETLK, &file_lock);
1551 if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private)
1552 file_lock.fl_ops->fl_release_private(&file_lock);
1551 if (error < 0) 1553 if (error < 0)
1552 goto out; 1554 goto out;
1553 else 1555 else
@@ -1690,6 +1692,8 @@ int fcntl_getlk64(struct file *filp, struct flock64 __user *l)
1690 1692
1691 if (filp->f_op && filp->f_op->lock) { 1693 if (filp->f_op && filp->f_op->lock) {
1692 error = filp->f_op->lock(filp, F_GETLK, &file_lock); 1694 error = filp->f_op->lock(filp, F_GETLK, &file_lock);
1695 if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private)
1696 file_lock.fl_ops->fl_release_private(&file_lock);
1693 if (error < 0) 1697 if (error < 0)
1694 goto out; 1698 goto out;
1695 else 1699 else
@@ -1873,6 +1877,8 @@ void locks_remove_flock(struct file *filp)
1873 .fl_end = OFFSET_MAX, 1877 .fl_end = OFFSET_MAX,
1874 }; 1878 };
1875 filp->f_op->flock(filp, F_SETLKW, &fl); 1879 filp->f_op->flock(filp, F_SETLKW, &fl);
1880 if (fl.fl_ops && fl.fl_ops->fl_release_private)
1881 fl.fl_ops->fl_release_private(&fl);
1876 } 1882 }
1877 1883
1878 lock_kernel(); 1884 lock_kernel();