mandatory_lock.h

来自「ocfs1.4.1 oracle分布式文件系统」· C头文件 代码 · 共 28 行

H
28
字号
#ifndef KAPI_MANDATORY_LOCK_H#define KAPI_MANDATORY_LOCK_H#ifdef NO_MANDATORY_LOCK#include <linux/fs.h>/* * Candidates for mandatory locking have the setgid bit set * but no group execute bit -  an otherwise meaningless combination. */static inline int __mandatory_lock(struct inode *ino){        return (ino->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID;}/* * ... and these candidates should be on MS_MANDLOCK mounted fs, * otherwise these will be advisory locks */static inline int mandatory_lock(struct inode *ino){        return IS_MANDLOCK(ino) && __mandatory_lock(ino);}#endif#endif /* KAPI_MANDATORY_LOCK_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?