]> Git Repo - linux.git/commitdiff
Merge branch 'for-viro' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
authorAl Viro <[email protected]>
Wed, 3 Aug 2016 17:31:51 +0000 (13:31 -0400)
committerAl Viro <[email protected]>
Wed, 3 Aug 2016 17:31:51 +0000 (13:31 -0400)
1  2 
fs/inode.c
fs/internal.h
include/linux/fs.h

diff --combined fs/inode.c
index e171f7b5f9e490c6fbcc07cdb5d4d12a80446c90,2029357fcf97dd23a30788a94f8b36a7ad3a9631..997f537cf3cc3677bb350b453d5e2c5e325471b5
@@@ -365,7 -365,6 +365,7 @@@ void inode_init_once(struct inode *inod
        INIT_HLIST_NODE(&inode->i_hash);
        INIT_LIST_HEAD(&inode->i_devices);
        INIT_LIST_HEAD(&inode->i_io_list);
 +      INIT_LIST_HEAD(&inode->i_wb_list);
        INIT_LIST_HEAD(&inode->i_lru);
        address_space_init_once(&inode->i_data);
        i_size_ordered_init(inode);
@@@ -508,7 -507,6 +508,7 @@@ void clear_inode(struct inode *inode
        BUG_ON(!list_empty(&inode->i_data.private_list));
        BUG_ON(!(inode->i_state & I_FREEING));
        BUG_ON(inode->i_state & I_CLEAR);
 +      BUG_ON(!list_empty(&inode->i_wb_list));
        /* don't need i_lock here, no concurrent mods to i_state */
        inode->i_state = I_FREEING | I_CLEAR;
  }
@@@ -1722,7 -1720,6 +1722,6 @@@ int dentry_needs_remove_privs(struct de
                mask |= ATTR_KILL_PRIV;
        return mask;
  }
- EXPORT_SYMBOL(dentry_needs_remove_privs);
  
  static int __remove_privs(struct dentry *dentry, int kill)
  {
   */
  int file_remove_privs(struct file *file)
  {
-       struct dentry *dentry = file->f_path.dentry;
-       struct inode *inode = d_inode(dentry);
+       struct dentry *dentry = file_dentry(file);
+       struct inode *inode = file_inode(file);
        int kill;
        int error = 0;
  
        if (IS_NOSEC(inode))
                return 0;
  
-       kill = file_needs_remove_privs(file);
+       kill = dentry_needs_remove_privs(dentry);
        if (kill < 0)
                return kill;
        if (kill)
diff --combined fs/internal.h
index cef0913e5d417418166986d09d0da11817af1edb,30b568f0261384a48ee0dee2b3aba25ac6305e31..cc5a530e4f06c5b291f6f034724328c80920e225
@@@ -11,7 -11,6 +11,7 @@@
  
  struct super_block;
  struct file_system_type;
 +struct iomap;
  struct linux_binprm;
  struct path;
  struct mount;
@@@ -40,8 -39,6 +40,8 @@@ static inline int __sync_blockdev(struc
   * buffer.c
   */
  extern void guard_bio_eod(int rw, struct bio *bio);
 +extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len,
 +              get_block_t *get_block, struct iomap *iomap);
  
  /*
   * char_dev.c
@@@ -117,6 -114,7 +117,7 @@@ extern int vfs_open(const struct path *
   */
  extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc);
  extern void inode_add_lru(struct inode *inode);
+ extern int dentry_needs_remove_privs(struct dentry *dentry);
  
  /*
   * fs-writeback.c
diff --combined include/linux/fs.h
index f65a6801f60967346f7a47b4c49087966dcb2593,448641bcafc5d70b4e88884c6c4c378b24b8fd8c..3f8167a496750e86308bf9d2f66c63752a5a51a9
@@@ -152,10 -152,9 +152,10 @@@ typedef int (dio_iodone_t)(struct kioc
  #define CHECK_IOVEC_ONLY -1
  
  /*
 - * The below are the various read and write types that we support. Some of
 + * The below are the various read and write flags that we support. Some of
   * them include behavioral modifiers that send information down to the
 - * block layer and IO scheduler. Terminology:
 + * block layer and IO scheduler. They should be used along with a req_op.
 + * Terminology:
   *
   *    The block layer uses device plugging to defer IO a little bit, in
   *    the hope that we will see more IO very shortly. This increases
   * READ_SYNC          A synchronous read. Device is not plugged, caller can
   *                    immediately wait on this read without caring about
   *                    unplugging.
 - * READA              Used for read-ahead operations. Lower priority, and the
 - *                    block layer could (in theory) choose to ignore this
 - *                    request if it runs into resource problems.
   * WRITE              A normal async write. Device will be plugged.
   * WRITE_SYNC         Synchronous write. Identical to WRITE, but passes down
   *                    the hint that someone will be waiting on this IO
   *                    non-volatile media on completion.
   *
   */
 -#define RW_MASK                       REQ_WRITE
 -#define RWA_MASK              REQ_RAHEAD
 +#define RW_MASK                       REQ_OP_WRITE
  
 -#define READ                  0
 -#define WRITE                 RW_MASK
 -#define READA                 RWA_MASK
 +#define READ                  REQ_OP_READ
 +#define WRITE                 REQ_OP_WRITE
  
 -#define READ_SYNC             (READ | REQ_SYNC)
 -#define WRITE_SYNC            (WRITE | REQ_SYNC | REQ_NOIDLE)
 -#define WRITE_ODIRECT         (WRITE | REQ_SYNC)
 -#define WRITE_FLUSH           (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH)
 -#define WRITE_FUA             (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
 -#define WRITE_FLUSH_FUA               (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
 +#define READ_SYNC             REQ_SYNC
 +#define WRITE_SYNC            (REQ_SYNC | REQ_NOIDLE)
 +#define WRITE_ODIRECT         REQ_SYNC
 +#define WRITE_FLUSH           (REQ_SYNC | REQ_NOIDLE | REQ_PREFLUSH)
 +#define WRITE_FUA             (REQ_SYNC | REQ_NOIDLE | REQ_FUA)
 +#define WRITE_FLUSH_FUA               (REQ_SYNC | REQ_NOIDLE | REQ_PREFLUSH | REQ_FUA)
  
  /*
   * Attribute flags.  These should be or-ed together to figure out what
@@@ -398,8 -402,6 +398,8 @@@ struct address_space_operations 
         */
        int (*migratepage) (struct address_space *,
                        struct page *, struct page *, enum migrate_mode);
 +      bool (*isolate_page)(struct page *, isolate_mode_t);
 +      void (*putback_page)(struct page *);
        int (*launder_page) (struct page *);
        int (*is_partially_uptodate) (struct page *, unsigned long,
                                        unsigned long);
@@@ -457,6 -459,7 +457,6 @@@ struct block_device 
        struct inode *          bd_inode;       /* will die */
        struct super_block *    bd_super;
        struct mutex            bd_mutex;       /* open/close mutex */
 -      struct list_head        bd_inodes;
        void *                  bd_claiming;
        void *                  bd_holder;
        int                     bd_holders;
@@@ -662,7 -665,6 +662,7 @@@ struct inode 
  #endif
        struct list_head        i_lru;          /* inode LRU list */
        struct list_head        i_sb_list;
 +      struct list_head        i_wb_list;      /* backing dev writeback list */
        union {
                struct hlist_head       i_dentry;
                struct rcu_head         i_rcu;
@@@ -1270,7 -1272,12 +1270,7 @@@ static inline struct inode *file_inode(
  
  static inline struct dentry *file_dentry(const struct file *file)
  {
 -      struct dentry *dentry = file->f_path.dentry;
 -
 -      if (unlikely(dentry->d_flags & DCACHE_OP_REAL))
 -              return dentry->d_op->d_real(dentry, file_inode(file));
 -      else
 -              return dentry;
 +      return d_real(file->f_path.dentry, file_inode(file), 0);
  }
  
  static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl)
@@@ -1441,9 -1448,6 +1441,9 @@@ struct super_block 
        /* s_inode_list_lock protects s_inodes */
        spinlock_t              s_inode_list_lock ____cacheline_aligned_in_smp;
        struct list_head        s_inodes;       /* all inodes */
 +
 +      spinlock_t              s_inode_wblist_lock;
 +      struct list_head        s_inodes_wb;    /* writeback inodes */
  };
  
  extern struct timespec current_fs_time(struct super_block *sb);
@@@ -2460,18 -2464,15 +2460,18 @@@ extern void make_bad_inode(struct inod
  extern bool is_bad_inode(struct inode *);
  
  #ifdef CONFIG_BLOCK
 -/*
 - * return READ, READA, or WRITE
 - */
 -#define bio_rw(bio)           ((bio)->bi_rw & (RW_MASK | RWA_MASK))
 +static inline bool op_is_write(unsigned int op)
 +{
 +      return op == REQ_OP_READ ? false : true;
 +}
  
  /*
   * return data direction, READ or WRITE
   */
 -#define bio_data_dir(bio)     ((bio)->bi_rw & 1)
 +static inline int bio_data_dir(struct bio *bio)
 +{
 +      return op_is_write(bio_op(bio)) ? WRITE : READ;
 +}
  
  extern void check_disk_size_change(struct gendisk *disk,
                                   struct block_device *bdev);
@@@ -2506,7 -2507,6 +2506,7 @@@ extern int __filemap_fdatawrite_range(s
                                loff_t start, loff_t end, int sync_mode);
  extern int filemap_fdatawrite_range(struct address_space *mapping,
                                loff_t start, loff_t end);
 +extern int filemap_check_errors(struct address_space *mapping);
  
  extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
                           int datasync);
@@@ -2725,11 -2725,6 +2725,6 @@@ extern struct inode *new_inode(struct s
  extern void free_inode_nonrcu(struct inode *inode);
  extern int should_remove_suid(struct dentry *);
  extern int file_remove_privs(struct file *);
- extern int dentry_needs_remove_privs(struct dentry *dentry);
- static inline int file_needs_remove_privs(struct file *file)
- {
-       return dentry_needs_remove_privs(file->f_path.dentry);
- }
  
  extern void __insert_inode_hash(struct inode *, unsigned long hashval);
  static inline void insert_inode_hash(struct inode *inode)
@@@ -2747,7 -2742,7 +2742,7 @@@ static inline void remove_inode_hash(st
  extern void inode_sb_list_add(struct inode *inode);
  
  #ifdef CONFIG_BLOCK
 -extern blk_qc_t submit_bio(int, struct bio *);
 +extern blk_qc_t submit_bio(struct bio *);
  extern int bdev_read_only(struct block_device *);
  #endif
  extern int set_blocksize(struct block_device *, int);
@@@ -2802,7 -2797,7 +2797,7 @@@ extern int generic_file_open(struct ino
  extern int nonseekable_open(struct inode * inode, struct file * filp);
  
  #ifdef CONFIG_BLOCK
 -typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
 +typedef void (dio_submit_t)(struct bio *bio, struct inode *inode,
                            loff_t file_offset);
  
  enum {
This page took 0.079913 seconds and 4 git commands to generate.