Commit 70cc6487a4e08b8698c0e2ec935fb48d10490162
1 parent
c2fa1b8a6c
Exists in
master
and in
7 other branches
locks: make ->lock release private data before returning in GETLK case
The file_lock argument to ->lock is used to return the conflicting lock when found. There's no reason for the filesystem to return any private information with this conflicting lock, but nfsv4 is. Fix nfsv4 client, and modify locks.c to stop calling fl_release_private for it in this case. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Cc: "Trond Myklebust" <Trond.Myklebust@netapp.com>"
Showing 2 changed files with 1 additions and 4 deletions Side-by-side Diff
fs/locks.c
... | ... | @@ -1665,8 +1665,6 @@ |
1665 | 1665 | |
1666 | 1666 | if (filp->f_op && filp->f_op->lock) { |
1667 | 1667 | error = filp->f_op->lock(filp, F_GETLK, &file_lock); |
1668 | - if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private) | |
1669 | - file_lock.fl_ops->fl_release_private(&file_lock); | |
1670 | 1668 | if (error < 0) |
1671 | 1669 | goto out; |
1672 | 1670 | else |
... | ... | @@ -1804,8 +1802,6 @@ |
1804 | 1802 | |
1805 | 1803 | if (filp->f_op && filp->f_op->lock) { |
1806 | 1804 | error = filp->f_op->lock(filp, F_GETLK, &file_lock); |
1807 | - if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private) | |
1808 | - file_lock.fl_ops->fl_release_private(&file_lock); | |
1809 | 1805 | if (error < 0) |
1810 | 1806 | goto out; |
1811 | 1807 | else |