Message ID | 2c9e21196b0949087c892ffffe49d26174a54fdd.1451480826.git.bcodding@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Dec 30, 2015 at 08:14:04AM -0500, Benjamin Coddington wrote: > Use FL_CLOSE in fl_flags as in locks_remove_posix() when clearing locks. > NFS will depend on this flag to properly defer an unlock until IO under the > current lock has completed. I wish we had a different of for relasing locks vs acquiring them, but for now this looks fine to me: Reviewed-by: Christoph Hellwig <hch@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/locks.c b/fs/locks.c index 0d2b326..9aea07a 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -2423,7 +2423,7 @@ locks_remove_flock(struct file *filp, struct file_lock_context *flctx) .fl_owner = filp, .fl_pid = current->tgid, .fl_file = filp, - .fl_flags = FL_FLOCK, + .fl_flags = FL_FLOCK | FL_CLOSE, .fl_type = F_UNLCK, .fl_end = OFFSET_MAX, };
Use FL_CLOSE in fl_flags as in locks_remove_posix() when clearing locks. NFS will depend on this flag to properly defer an unlock until IO under the current lock has completed. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> --- fs/locks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)