Jon Mason wrote:
posix_test_lock has changed how it notifies callers of a file being
locked.  In older versions (like the one in RHEL5.1), it returned an
integer specifying the file lock state.  In more modern versions, it is
a void function that sets a flag in the file lock struct.  Since the NFS
code in the backport expects the flag to be set, callers of this
function must set it appropriately based on the return code.

This fixes locking issues experienced running Connectathon against a
RHEL5.1 NFS Server.

Signed-Off-By: Jon Mason <[email protected]>
---

diff --git a/kernel_addons/backport/2.6.18-EL5.1/include/linux/fs.h 
b/kernel_addons/backport/2.6.18-EL5.1/include/linux/fs.h
index 00ac858..7937be3 100644
--- a/kernel_addons/backport/2.6.18-EL5.1/include/linux/fs.h
+++ b/kernel_addons/backport/2.6.18-EL5.1/include/linux/fs.h
@@ -62,9 +62,13 @@ static inline void clear_nlink(struct inode *inode)
static inline int vfs_test_lock(struct file *filp, struct file_lock *fl)
 {
+       int rc;
+
        if (filp->f_op && filp->f_op->lock)
                return filp->f_op->lock(filp, F_GETLK, fl);
-       posix_test_lock(filp, fl, fl);
+       rc = posix_test_lock(filp, fl, fl);
+       if (rc == 0)
+               fl->fl_type = F_UNLCK;
        return 0;
 }

Applied,

Regards,
Vladimir
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to