]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - include/linux/fs.h
Merge tag 'io_uring-2019-03-06' of git://git.kernel.dk/linux-block
[thirdparty/kernel/linux.git] / include / linux / fs.h
index 80e1b199a4b1212927d0cd10080690650488d2d5..0a257d89208e0aa5e2e2ed0dc2d21b42abbee705 100644 (file)
@@ -37,6 +37,9 @@
 #include <linux/uuid.h>
 #include <linux/errseq.h>
 #include <linux/ioprio.h>
+#include <linux/fs_types.h>
+#include <linux/build_bug.h>
+#include <linux/stddef.h>
 
 #include <asm/byteorder.h>
 #include <uapi/linux/fs.h>
@@ -304,6 +307,10 @@ enum rw_hint {
 
 struct kiocb {
        struct file             *ki_filp;
+
+       /* The 'ki_filp' pointer is shared in a union for aio */
+       randomized_struct_fields_start
+
        loff_t                  ki_pos;
        void (*ki_complete)(struct kiocb *iocb, long ret, long ret2);
        void                    *private;
@@ -311,7 +318,9 @@ struct kiocb {
        u16                     ki_hint;
        u16                     ki_ioprio; /* See linux/ioprio.h */
        unsigned int            ki_cookie; /* for ->iopoll */
-} __randomize_layout;
+
+       randomized_struct_fields_end
+};
 
 static inline bool is_sync_kiocb(struct kiocb *kiocb)
 {
@@ -1703,22 +1712,6 @@ int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
                            u64 phys, u64 len, u32 flags);
 int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
 
-/*
- * File types
- *
- * NOTE! These match bits 12..15 of stat.st_mode
- * (ie "(i_mode >> 12) & 15").
- */
-#define DT_UNKNOWN     0
-#define DT_FIFO                1
-#define DT_CHR         2
-#define DT_DIR         4
-#define DT_BLK         6
-#define DT_REG         8
-#define DT_LNK         10
-#define DT_SOCK                12
-#define DT_WHT         14
-
 /*
  * This is the "filldir" function type, used by readdir() to let
  * the kernel specify what kind of dirent layout it wants to have.
@@ -2089,7 +2082,7 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp)
  * I_WB_SWITCH         Cgroup bdi_writeback switching in progress.  Used to
  *                     synchronize competing switching instances and to tell
  *                     wb stat updates to grab the i_pages lock.  See
- *                     inode_switch_wb_work_fn() for details.
+ *                     inode_switch_wbs_work_fn() for details.
  *
  * I_OVL_INUSE         Used by overlayfs to get exclusive ownership on upper
  *                     and work dirs among overlayfs mounts.
@@ -2491,6 +2484,7 @@ struct filename {
        struct audit_names      *aname;
        const char              iname[];
 };
+static_assert(offsetof(struct filename, iname) % sizeof(long) == 0);
 
 extern long vfs_truncate(const struct path *, loff_t);
 extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,