kernel-ark/fs/nfsd
Pavel Emelyanov a16877ca9c Cleanup macros for distinguishing mandatory locks
The combination of S_ISGID bit set and S_IXGRP bit unset is used to mark the
inode as "mandatory lockable" and there's a macro for this check called
MANDATORY_LOCK(inode).  However, fs/locks.c and some filesystems still perform
the explicit i_mode checking.  Besides, Andrew pointed out, that this macro is
buggy itself, as it dereferences the inode arg twice.

Convert this macro into static inline function and switch its users to it,
making the code shorter and more readable.

The __mandatory_lock() helper is to be used in places where the IS_MANDLOCK()
for superblock is already known to be true.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-10-09 18:32:46 -04:00
..
auth.c knfsd: clean up EX_RDONLY 2007-07-19 10:04:52 -07:00
export.c knfsd: eliminate unnecessary -ENOENT returns on export downcalls 2007-07-31 15:39:38 -07:00
lockd.c knfsd: lockd: nfsd4: use same grace period for lockd and nfsd4 2007-07-17 10:23:07 -07:00
Makefile
nfs2acl.c
nfs3acl.c
nfs3proc.c
nfs3xdr.c
nfs4acl.c knfsd: nfsd4: fix handling of acl errrors 2007-07-17 10:23:07 -07:00
nfs4callback.c knfsd: nfsd4: fix enc_stateid_sz for nfsd callbacks 2007-07-17 10:23:07 -07:00
nfs4idmap.c nfsd4: idmap upcalls should use unsigned uid and gid 2007-07-31 15:39:38 -07:00
nfs4proc.c knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE 2007-07-31 15:39:38 -07:00
nfs4recover.c
nfs4state.c Cleanup macros for distinguishing mandatory locks 2007-10-09 18:32:46 -04:00
nfs4xdr.c lockd and nfsd endianness annotation fixes 2007-07-26 11:11:56 -07:00
nfscache.c
nfsctl.c knfsd: nfsd: remove unused header interface.h 2007-07-17 10:23:07 -07:00
nfsfh.c knfsd: Validate filehandle type in fsid_source 2007-09-10 18:57:47 -07:00
nfsproc.c knfsd: nfsd4: make readonly access depend on pseudoflavor 2007-07-17 10:23:08 -07:00
nfssvc.c knfsd: nfsd4: return nfserr_wrongsec 2007-07-17 10:23:08 -07:00
nfsxdr.c
stats.c
vfs.c Cleanup macros for distinguishing mandatory locks 2007-10-09 18:32:46 -04:00