All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NFS nolock broken in 2.6.9-rc4
@ 2004-10-15  9:58 Olaf Kirch
  2004-10-15 10:07 ` Olaf Kirch
  2004-10-15 14:44 ` Trond Myklebust
  0 siblings, 2 replies; 10+ messages in thread
From: Olaf Kirch @ 2004-10-15  9:58 UTC (permalink / raw)
  To: nfs, akpm


Hi,

2.6.9-rc2 and later contain the following hunks in fs/locks.c:

@@ -1489,8 +1534,7 @@ int fcntl_setlk(struct file *filp, unsig

        if (filp->f_op && filp->f_op->lock != NULL) {
                error = filp->f_op->lock(filp, cmd, file_lock);
-               if (error < 0)
-                       goto out;
+               goto out;
        }

        for (;;) {
@@ -1624,8 +1668,7 @@ int fcntl_setlk64(struct file *filp, uns

        if (filp->f_op && filp->f_op->lock != NULL) {
                error = filp->f_op->lock(filp, cmd, file_lock);
-               if (error < 0)
-                       goto out;
+               goto out;
        }

        for (;;) {

For an NFS file system mounted with -o nolock, this means filp->f_op->lock
will return 0 but do nothing. Previously, this would cause local locking
to be used. With the change above, we just return. 

I don't know why this change was made. The patch below simply reverts
these two hunks; maybe there's a better solution involving LOCK_USE_CLNT
the way it's used for F_GETLK at the moment.

Olaf
-- 
Olaf Kirch     | Things that make Monday morning interesting, #1:
okir@suse.de   |        "I want to use NFS over AX25, can you help me?"
---------------+ 


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-10-18  7:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15  9:58 [PATCH] NFS nolock broken in 2.6.9-rc4 Olaf Kirch
2004-10-15 10:07 ` Olaf Kirch
2004-10-15 14:46   ` Trond Myklebust
2004-10-15 15:11     ` Trond Myklebust
2004-10-15 15:13       ` Trond Myklebust
     [not found]   ` <20041016004957.38ccd273.akpm@osdl.org>
2004-10-18  7:39     ` Olaf Kirch
2004-10-15 14:44 ` Trond Myklebust
2004-10-15 15:12   ` Olaf Kirch
2004-10-15 15:21     ` Olaf Kirch
2004-10-15 16:47       ` Trond Myklebust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.