criu/include/fcntl.h
Cyrill Gorcunov e15914fb08 fsnotify: Open handle with O_PATH, v2
Otherwise if the mark is set up on link we end
with -ELOOP error trying to open it. Thus, use
O_PATH pointing the kernel that we're not going
to read/write this descriptor.

Repored-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-02-25 23:38:35 +04:00

36 lines
614 B
C

#ifndef __CR_ASM_GENERIC_FCNTL_H__
#define __CR_ASM_GENERIC_FCNTL_H__
#include <sys/types.h>
#include <fcntl.h>
#ifndef F_SETOWN_EX
#define F_SETOWN_EX 15
#define F_GETOWN_EX 16
struct f_owner_ex {
int type;
pid_t pid;
};
#endif
#ifndef F_GETOWNER_UIDS
#define F_GETOWNER_UIDS 17
#endif
#ifndef F_LINUX_SPECIFIC_BASE
#define F_LINUX_SPECIFIC_BASE 1024
#endif
#ifndef F_SETPIPE_SZ
# define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
#endif
#ifndef F_GETPIPE_SZ
# define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
#endif
#ifndef O_PATH
# define O_PATH 010000000
#endif
#endif /* __CR_ASM_GENERIC_FCNTL_H__ */