History

Unexport some bits of linux/fs.h

There are some bits of linux/fs.h which are only used within the kernel and shouldn't be in the UAPI. Move these from uapi/linux/fs.h into linux/fs.h.

David Howells committed 14 years ago

Commit bbc10961 parent 45525b22 files · +130 −132Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/fs.h+0−132
@@ -57,85 +57,6 @@ struct inodes_stat_t { · 56 unmodified lines
5757
5858 #define NR_FILE 8192 /* this can well be larger on a larger system */
5959
60−#define MAY_EXEC 0x00000001
61−#define MAY_WRITE 0x00000002
62−#define MAY_READ 0x00000004
63−#define MAY_APPEND 0x00000008
64−#define MAY_ACCESS 0x00000010
65−#define MAY_OPEN 0x00000020
66−#define MAY_CHDIR 0x00000040
67−/* called from RCU mode, don't block */
68−#define MAY_NOT_BLOCK 0x00000080
69−
70−/*
71− * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
72− * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()
73− */
74−
75−/* file is open for reading */
76−#define FMODE_READ ((__force fmode_t)0x1)
77−/* file is open for writing */
78−#define FMODE_WRITE ((__force fmode_t)0x2)
79−/* file is seekable */
80−#define FMODE_LSEEK ((__force fmode_t)0x4)
81−/* file can be accessed using pread */
82−#define FMODE_PREAD ((__force fmode_t)0x8)
83−/* file can be accessed using pwrite */
84−#define FMODE_PWRITE ((__force fmode_t)0x10)
85−/* File is opened for execution with sys_execve / sys_uselib */
86−#define FMODE_EXEC ((__force fmode_t)0x20)
87−/* File is opened with O_NDELAY (only set for block devices) */
88−#define FMODE_NDELAY ((__force fmode_t)0x40)
89−/* File is opened with O_EXCL (only set for block devices) */
90−#define FMODE_EXCL ((__force fmode_t)0x80)
91−/* File is opened using open(.., 3, ..) and is writeable only for ioctls
92− (specialy hack for floppy.c) */
93−#define FMODE_WRITE_IOCTL ((__force fmode_t)0x100)
94−/* 32bit hashes as llseek() offset (for directories) */
95−#define FMODE_32BITHASH ((__force fmode_t)0x200)
96−/* 64bit hashes as llseek() offset (for directories) */
97−#define FMODE_64BITHASH ((__force fmode_t)0x400)
98−
99−/*
100− * Don't update ctime and mtime.
101− *
102− * Currently a special hack for the XFS open_by_handle ioctl, but we'll
103− * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
104− */
105−#define FMODE_NOCMTIME ((__force fmode_t)0x800)
106−
107−/* Expect random access pattern */
108−#define FMODE_RANDOM ((__force fmode_t)0x1000)
109−
110−/* File is huge (eg. /dev/kmem): treat loff_t as unsigned */
111−#define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000)
112−
113−/* File is opened with O_PATH; almost nothing can be done with it */
114−#define FMODE_PATH ((__force fmode_t)0x4000)
115−
116−/* File was opened by fanotify and shouldn't generate fanotify events */
117−#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
118−
119−/*
120− * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector
121− * that indicates that they should check the contents of the iovec are
122− * valid, but not check the memory that the iovec elements
123− * points too.
124− */
125−#define CHECK_IOVEC_ONLY -1
126−
127−#define SEL_IN 1
128−#define SEL_OUT 2
129−#define SEL_EX 4
130−
131−/* public flags for file_system_type */
132−#define FS_REQUIRES_DEV 1
133−#define FS_BINARY_MOUNTDATA 2
134−#define FS_HAS_SUBTYPE 4
135−#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
136−#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move()
137− * during rename() internally.
138− */
13960
14061 /*
14162 * These are the fs-independent mount-flags: up to 32 flags are supported
@@ -181,59 +102,6 @@ struct inodes_stat_t { · 39 unmodified lines
181102 #define MS_MGC_VAL 0xC0ED0000
182103 #define MS_MGC_MSK 0xffff0000
183104
184−/* Inode flags - they have nothing to superblock flags now */
185−
186−#define S_SYNC 1 /* Writes are synced at once */
187−#define S_NOATIME 2 /* Do not update access times */
188−#define S_APPEND 4 /* Append-only file */
189−#define S_IMMUTABLE 8 /* Immutable file */
190−#define S_DEAD 16 /* removed, but still open directory */
191−#define S_NOQUOTA 32 /* Inode is not counted to quota */
192−#define S_DIRSYNC 64 /* Directory modifications are synchronous */
193−#define S_NOCMTIME 128 /* Do not update file c/mtime */
194−#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */
195−#define S_PRIVATE 512 /* Inode is fs-internal */
196−#define S_IMA 1024 /* Inode has an associated IMA struct */
197−#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
198−#define S_NOSEC 4096 /* no suid or xattr security attributes */
199−
200−/*
201− * Note that nosuid etc flags are inode-specific: setting some file-system
202− * flags just means all the inodes inherit those flags by default. It might be
203− * possible to override it selectively if you really wanted to with some
204− * ioctl() that is not currently implemented.
205− *
206− * Exception: MS_RDONLY is always applied to the entire file system.
207− *
208− * Unfortunately, it is possible to change a filesystems flags with it mounted
209− * with files in use. This means that all of the inodes will not have their
210− * i_flags updated. Hence, i_flags no longer inherit the superblock mount
211− * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org
212− */
213−#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
214−
215−#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
216−#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \
217− ((inode)->i_flags & S_SYNC))
218−#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
219− ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
220−#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
221−#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
222−#define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION)
223−
224−#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
225−#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
226−#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
227−#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL)
228−
229−#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
230−#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
231−#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
232−#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
233−#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
234−#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
235−#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
236−
237105 /* the read-only stuff doesn't really belong here, but any other place is
238106 probably as bad and I don't want to create yet another include file. */
239107