]> err.no Git - linux-2.6/blobdiff - fs/afs/flock.c
Pull bugzilla-7880 into release branch
[linux-2.6] / fs / afs / flock.c
index 8f07f8d1bfa9b59b75f17779486be615e6bc1ce0..4f77f3caee97469f73694b74cd69cb8df3b25d3c 100644 (file)
@@ -456,7 +456,8 @@ static int afs_do_getlk(struct file *file, struct file_lock *fl)
 
        /* check local lock records first */
        ret = 0;
-       if (posix_test_lock(file, fl) == 0) {
+       posix_test_lock(file, fl);
+       if (fl->fl_type == F_UNLCK) {
                /* no local locks; consult the server */
                ret = afs_vnode_fetch_status(vnode, NULL, key);
                if (ret < 0)