]> git.decadent.org.uk Git - nfs-utils.git/commit
Mountd should use separate lockfiles
authorBen Myers <bpm@sgi.com>
Fri, 3 Apr 2009 19:13:10 +0000 (15:13 -0400)
committerSteve Dickson <steved@redhat.com>
Fri, 3 Apr 2009 19:13:10 +0000 (15:13 -0400)
commitf0ed8401e854e1cbd23b2fb5dca5e88dec2df7c4
treee525bec15e10a3c984dbc6b26b075a7433e0d417
parentc56152202a3000c69b87f9cb90f40166f1f21275
Mountd should use separate lockfiles

Mountd keeps file descriptors used for locks separate from
those used for io and seems to assume that the lock will
only be released on close of the file descriptor that was used
with fcntl.  Actually the lock is released when any file
descriptor for that file is closed.  When setexportent() is called
after xflock() he closes and reopens the io file descriptor and defeats the
lock.

This patch fixes that by using a separate file for locking, cleaning
them up when finished.

Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
support/export/rmtab.c
support/export/xtab.c
support/include/nfslib.h
support/nfs/xio.c
utils/mountd/mountd.c
utils/mountd/rmtab.c