diff options
| author | Pavel Emelyanov <[email protected]> | 2007-10-01 14:41:11 -0700 |
|---|---|---|
| committer | J. Bruce Fields <[email protected]> | 2007-10-09 18:32:46 -0400 |
| commit | a16877ca9cec211708a161057a7cbfbf2cbc3a53 (patch) | |
| tree | a114bfe588af58047b1eb2aa1f57ac4b890c01a6 /scripts/patch-kernel | |
| parent | 98257af5a2ad0c5b502ebd07094d9fd8ce87acef (diff) | |
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 <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: "J. Bruce Fields" <[email protected]>
Cc: David Howells <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Ron Minnich <[email protected]>
Cc: Latchesar Ionkov <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions