linux/include
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
..
acpi ACPI: CONFIG_ACPI_SLEEP=n power off regression in 2.6.23-rc8 (NOT in rc7) 2007-09-25 17:58:52 -04:00
asm-alpha Fix Alpha O_CLOEXEC definition 2007-08-09 08:39:22 -07:00
asm-arm Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2007-08-25 12:38:47 +01:00
asm-avr32 [AVR32] Define mmiowb() 2007-08-15 16:36:56 +02:00
asm-blackfin Blackfin arch: fix PORT_J BUG for BF537/6 EMAC driver reported by Kalle Pokki <kalle.pokki@iki.fi> 2007-10-04 00:36:18 +08:00
asm-cris remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-frv FRV: connect up fallocate 2007-08-11 15:47:40 -07:00
asm-generic Define termios_1 functions for powerpc, s390, avr32 and frv 2007-09-12 09:08:05 -07:00
asm-h8300 Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
asm-i386 i386: remove bogus comment about memory barrier 2007-09-29 09:13:59 -07:00
asm-ia64 [IA64] Cleanup HPSIM code (was: Re: Enable early console for Ski simulator) 2007-09-01 02:52:25 -07:00
asm-m32r Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
asm-m68k m68k(nommu): add missing syscalls 2007-09-11 17:21:20 -07:00
asm-m68knommu Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
asm-mips [MIPS] Terminally fix local_{dec,sub}_if_positive 2007-10-03 14:30:52 +01:00
asm-parisc [PARISC] Add dummy isa_(bus|virt)_to_(virt|bus) inlines 2007-08-27 00:29:22 -04:00
asm-powerpc [POWERPC] Fix timekeeping on PowerPC 601 2007-09-19 15:26:34 +10:00
asm-ppc [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support 2007-07-24 21:16:02 +00:00
asm-s390 [S390] Change atomic_read/set to inline functions with barrier semantics. 2007-08-22 13:51:49 +02:00
asm-sh Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
asm-sh64 sh64: Add missing dma_sync_single_for_*(). 2007-08-10 02:47:31 +09:00
asm-sparc [SPARC32]: Make flush_tlb_kernel_range() an inline function. 2007-08-26 18:49:12 -07:00
asm-sparc64 [SPARC64]: Fix lockdep, particularly on SMP. 2007-09-16 11:51:15 -07:00
asm-um UML: Fix ELF_CORE_COPY_REGS build botch 2007-09-10 18:58:05 -07:00
asm-v850 Binfmt_flat: Add minimum support for the Blackfin relocations 2007-10-03 23:41:43 +08:00
asm-x86_64 Remove unnecessary cast in prefetch() 2007-10-05 08:04:35 -07:00
asm-xtensa [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls 2007-08-27 13:54:25 -07:00
crypto
keys
linux Cleanup macros for distinguishing mandatory locks 2007-10-09 18:32:46 -04:00
math-emu Fix <math-emu/soft-fp.h> tpyo 2007-08-18 17:15:17 -07:00
media V4L/DVB (6220a): fix build error for et61x251 driver 2007-09-14 13:39:12 -03:00
mtd UBI: kill homegrown endian macros 2007-07-18 16:53:49 +03:00
net [ROSE]: Fix rose.ko oops on unload 2007-10-07 23:44:17 -07:00
pcmcia PCMCIA-NETDEV : add new ID of lan&modem multifunction card 2007-07-08 22:16:39 -04:00
rdma IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c 2007-08-03 10:45:18 -07:00
rxrpc
scsi [SCSI] libiscsi: sync up iscsi and scsi eh's access to the connection 2007-08-15 13:09:21 -05:00
sound [ALSA] version 1.0.14 2007-07-20 11:13:35 +02:00
video remove tx3912fb 2007-07-31 15:39:41 -07:00
xen xen: xen/page.h compile fix 2007-07-26 11:35:16 -07:00
Kbuild