📄 mandatory_lock.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -