From 3d20cbb87f2633cb42a00cbe06382773db0469b1 Mon Sep 17 00:00:00 2001 From: milisbir Date: Fri, 17 Aug 2018 09:35:48 +0300 Subject: [PATCH] kernel --- talimatname/genel/k/kernel/aufs4-base.patch | 48 +- talimatname/genel/k/kernel/aufs4-kbuild.patch | 10 +- .../genel/k/kernel/aufs4-loopback.patch | 50 +- talimatname/genel/k/kernel/aufs4-mmap.patch | 74 +- .../genel/k/kernel/aufs4-standalone.patch | 84 +- talimatname/genel/k/kernel/aufs4.patch | 3069 +++++++++-------- talimatname/genel/k/kernel/config | 513 ++- talimatname/genel/k/kernel/kernel.kur-kos | 2 +- talimatname/genel/k/kernel/talimat | 15 +- talimatname/genel/k/kernel/tmpfs-idr.patch | 30 +- talimatname/genel/k/kernel/vfs-ino.patch | 6 +- 11 files changed, 2071 insertions(+), 1830 deletions(-) diff --git a/talimatname/genel/k/kernel/aufs4-base.patch b/talimatname/genel/k/kernel/aufs4-base.patch index 4de0c0749..64e05c4f8 100644 --- a/talimatname/genel/k/kernel/aufs4-base.patch +++ b/talimatname/genel/k/kernel/aufs4-base.patch @@ -1,11 +1,11 @@ SPDX-License-Identifier: GPL-2.0 -aufs4.15 base patch +aufs4.17 base patch diff --git a/MAINTAINERS b/MAINTAINERS -index 845fc25..7dc2813 100644 +index 9c125f7..4616bbf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2486,6 +2486,19 @@ F: include/linux/audit.h +@@ -2519,6 +2519,19 @@ F: include/linux/audit.h F: include/uapi/linux/audit.h F: kernel/audit* @@ -26,10 +26,10 @@ index 845fc25..7dc2813 100644 M: Miguel Ojeda Sandonis W: http://miguelojeda.es/auxdisplay.htm diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index d5fe720..c292afa 100644 +index 55cf554..bc965e5 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -691,6 +691,24 @@ static inline int is_loop_device(struct file *file) +@@ -713,6 +713,24 @@ static inline int is_loop_device(struct file *file) return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR; } @@ -55,10 +55,10 @@ index d5fe720..c292afa 100644 static ssize_t loop_attr_show(struct device *dev, char *page, diff --git a/fs/dcache.c b/fs/dcache.c -index 5c7df1d..019f14b 100644 +index 2acfc69..ff338e2 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1197,7 +1197,7 @@ enum d_walk_ret { +@@ -1234,7 +1234,7 @@ enum d_walk_ret { * * The @enter() and @finish() callbacks are called with d_lock held. */ @@ -68,7 +68,7 @@ index 5c7df1d..019f14b 100644 void (*finish)(void *)) { diff --git a/fs/fcntl.c b/fs/fcntl.c -index 0522e28..74c255d 100644 +index d737ff0..7550799 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -32,7 +32,7 @@ @@ -90,10 +90,10 @@ index 0522e28..74c255d 100644 return error; diff --git a/fs/inode.c b/fs/inode.c -index 03102d6..517883c 100644 +index 3b55391..e0c5255 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -1655,7 +1655,7 @@ EXPORT_SYMBOL(generic_update_time); +@@ -1663,7 +1663,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ @@ -103,7 +103,7 @@ index 03102d6..517883c 100644 int (*update_time)(struct inode *, struct timespec *, int); diff --git a/fs/namespace.c b/fs/namespace.c -index 9d1374a..26ef600 100644 +index 5f75969..61129ff 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -846,6 +846,12 @@ static inline int check_mnt(struct mount *mnt) @@ -120,10 +120,10 @@ index 9d1374a..26ef600 100644 * vfsmount lock must be held for write */ diff --git a/fs/read_write.c b/fs/read_write.c -index f8547b8..0a5c47b 100644 +index c4eabbf..ddd6e67 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -484,6 +484,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, +@@ -489,6 +489,28 @@ ssize_t __vfs_write(struct file *file, const char __user *p, size_t count, return -EINVAL; } @@ -153,7 +153,7 @@ index f8547b8..0a5c47b 100644 { mm_segment_t old_fs; diff --git a/fs/splice.c b/fs/splice.c -index 39e2dc0..c5fb195 100644 +index 005d09c..f617ab0 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -837,8 +837,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -181,7 +181,7 @@ index 39e2dc0..c5fb195 100644 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); diff --git a/fs/sync.c b/fs/sync.c -index 6e0a2cb..a6891ee 100644 +index b54e054..2860782 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -28,7 +28,7 @@ @@ -206,10 +206,10 @@ index 279720d..76e38ea 100644 static inline void fput_light(struct file *file, int fput_needed) { diff --git a/include/linux/fs.h b/include/linux/fs.h -index 511fbaa..96e05b3 100644 +index 760d8da..09a2542 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1265,6 +1265,7 @@ extern void fasync_free(struct fasync_struct *); +@@ -1270,6 +1270,7 @@ extern void fasync_free(struct fasync_struct *); /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -217,7 +217,7 @@ index 511fbaa..96e05b3 100644 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern int f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -1712,6 +1713,7 @@ struct file_operations { +@@ -1724,6 +1725,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -225,7 +225,7 @@ index 511fbaa..96e05b3 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -1782,6 +1784,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1794,6 +1796,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -238,7 +238,7 @@ index 511fbaa..96e05b3 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); -@@ -2201,6 +2209,7 @@ extern int current_umask(void); +@@ -2199,6 +2207,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec *, int); @@ -246,7 +246,7 @@ index 511fbaa..96e05b3 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2481,6 +2490,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2485,6 +2494,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -255,7 +255,7 @@ index 511fbaa..96e05b3 100644 extern const struct file_operations def_blk_fops; extern const struct file_operations def_chr_fops; diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h -index 3251d9c..0360952 100644 +index 6fc77d4..27e76f0 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -313,6 +313,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock, @@ -267,7 +267,7 @@ index 3251d9c..0360952 100644 /* * Acquire a lock. * -@@ -442,6 +444,7 @@ struct lockdep_map { }; +@@ -439,6 +441,7 @@ struct lockdep_map { }; #define lockdep_depth(tsk) (0) @@ -310,7 +310,7 @@ index 74b4911..19789fb 100644 + unsigned int flags); #endif diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 5216590..8b5f44d 100644 +index 0233863..06e0d7a 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -140,7 +140,7 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES]; diff --git a/talimatname/genel/k/kernel/aufs4-kbuild.patch b/talimatname/genel/k/kernel/aufs4-kbuild.patch index 51946ada9..5fcdc1076 100644 --- a/talimatname/genel/k/kernel/aufs4-kbuild.patch +++ b/talimatname/genel/k/kernel/aufs4-kbuild.patch @@ -1,11 +1,11 @@ SPDX-License-Identifier: GPL-2.0 -aufs4.15 kbuild patch +aufs4.17 kbuild patch diff --git a/fs/Kconfig b/fs/Kconfig -index 7aee6d6..ec92031 100644 +index bc821a8..7ae814c 100644 --- a/fs/Kconfig +++ b/fs/Kconfig -@@ -248,6 +248,7 @@ source "fs/pstore/Kconfig" +@@ -251,6 +251,7 @@ source "fs/pstore/Kconfig" source "fs/sysv/Kconfig" source "fs/ufs/Kconfig" source "fs/exofs/Kconfig" @@ -14,10 +14,10 @@ index 7aee6d6..ec92031 100644 endif # MISC_FILESYSTEMS diff --git a/fs/Makefile b/fs/Makefile -index ef772f1..51779e68c 100644 +index c9375fd..8af5671 100644 --- a/fs/Makefile +++ b/fs/Makefile -@@ -129,3 +129,4 @@ obj-y += exofs/ # Multiple modules +@@ -128,3 +128,4 @@ obj-y += exofs/ # Multiple modules obj-$(CONFIG_CEPH_FS) += ceph/ obj-$(CONFIG_PSTORE) += pstore/ obj-$(CONFIG_EFIVAR_FS) += efivarfs/ diff --git a/talimatname/genel/k/kernel/aufs4-loopback.patch b/talimatname/genel/k/kernel/aufs4-loopback.patch index 2dda88e30..4837ccac4 100644 --- a/talimatname/genel/k/kernel/aufs4-loopback.patch +++ b/talimatname/genel/k/kernel/aufs4-loopback.patch @@ -1,11 +1,11 @@ SPDX-License-Identifier: GPL-2.0 -aufs4.15 loopback patch +aufs4.17 loopback patch diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index c292afa..a93038c 100644 +index 5678bf8..ec9c4fb 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -600,6 +600,15 @@ static inline void loop_update_dio(struct loop_device *lo) +@@ -626,6 +626,15 @@ static inline void loop_update_dio(struct loop_device *lo) lo->use_dio); } @@ -21,7 +21,7 @@ index c292afa..a93038c 100644 static void loop_reread_partitions(struct loop_device *lo, struct block_device *bdev) { -@@ -634,6 +643,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -690,6 +699,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, unsigned int arg) { struct file *file, *old_file; @@ -29,7 +29,7 @@ index c292afa..a93038c 100644 struct inode *inode; int error; -@@ -650,9 +660,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -706,6 +716,12 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, file = fget(arg); if (!file) goto out; @@ -40,13 +40,17 @@ index c292afa..a93038c 100644 + get_file(file); + } + error = loop_validate_file(file, bdev); + if (error) +@@ -713,6 +729,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, + inode = file->f_mapping->host; old_file = lo->lo_backing_file; + old_virt_file = lo->lo_backing_virt_file; error = -EINVAL; -@@ -667,6 +684,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -724,6 +741,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, blk_mq_freeze_queue(lo->lo_queue); mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask); lo->lo_backing_file = file; @@ -54,7 +58,7 @@ index c292afa..a93038c 100644 lo->old_gfp_mask = mapping_gfp_mask(file->f_mapping); mapping_set_gfp_mask(file->f_mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); -@@ -674,12 +692,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -731,12 +749,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, blk_mq_unfreeze_queue(lo->lo_queue); fput(old_file); @@ -71,16 +75,16 @@ index c292afa..a93038c 100644 out: return error; } -@@ -873,7 +895,7 @@ static int loop_prepare_queue(struct loop_device *lo) +@@ -924,7 +946,7 @@ static int loop_prepare_queue(struct loop_device *lo) static int loop_set_fd(struct loop_device *lo, fmode_t mode, struct block_device *bdev, unsigned int arg) { -- struct file *file, *f; +- struct file *file; + struct file *file, *f, *virt_file = NULL; struct inode *inode; struct address_space *mapping; int lo_flags = 0; -@@ -887,6 +909,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, +@@ -938,6 +960,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, file = fget(arg); if (!file) goto out; @@ -93,7 +97,7 @@ index c292afa..a93038c 100644 error = -EBUSY; if (lo->lo_state != Lo_unbound) -@@ -935,6 +963,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, +@@ -970,6 +998,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, lo->lo_device = bdev; lo->lo_flags = lo_flags; lo->lo_backing_file = file; @@ -101,7 +105,7 @@ index c292afa..a93038c 100644 lo->transfer = NULL; lo->ioctl = NULL; lo->lo_sizelimit = 0; -@@ -968,6 +997,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, +@@ -1003,6 +1032,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode, out_putf: fput(file); @@ -110,7 +114,7 @@ index c292afa..a93038c 100644 out: /* This is safe: open() is still holding a reference. */ module_put(THIS_MODULE); -@@ -1014,6 +1045,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer, +@@ -1049,6 +1080,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer, static int loop_clr_fd(struct loop_device *lo) { struct file *filp = lo->lo_backing_file; @@ -118,7 +122,7 @@ index c292afa..a93038c 100644 gfp_t gfp = lo->old_gfp_mask; struct block_device *bdev = lo->lo_device; -@@ -1045,6 +1077,7 @@ static int loop_clr_fd(struct loop_device *lo) +@@ -1080,6 +1112,7 @@ static int loop_clr_fd(struct loop_device *lo) spin_lock_irq(&lo->lo_lock); lo->lo_state = Lo_rundown; lo->lo_backing_file = NULL; @@ -126,7 +130,7 @@ index c292afa..a93038c 100644 spin_unlock_irq(&lo->lo_lock); loop_release_xfer(lo); -@@ -1092,6 +1125,8 @@ static int loop_clr_fd(struct loop_device *lo) +@@ -1128,6 +1161,8 @@ static int loop_clr_fd(struct loop_device *lo) * bd_mutex which is usually taken before lo_ctl_mutex. */ fput(filp); @@ -136,7 +140,7 @@ index c292afa..a93038c 100644 } diff --git a/drivers/block/loop.h b/drivers/block/loop.h -index 0f45416..101f193 100644 +index 4d42c7a..a4974ee 100644 --- a/drivers/block/loop.h +++ b/drivers/block/loop.h @@ -46,7 +46,7 @@ struct loop_device { @@ -149,7 +153,7 @@ index 0f45416..101f193 100644 void *key_data; diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c -index 0d4ea929..af293c2 100644 +index 7ca7f67..3d4e90d 100644 --- a/fs/aufs/f_op.c +++ b/fs/aufs/f_op.c @@ -358,7 +358,7 @@ static ssize_t aufs_read_iter(struct kiocb *kio, struct iov_iter *iov_iter) @@ -162,7 +166,7 @@ index 0d4ea929..af293c2 100644 if (file->f_mapping != h_file->f_mapping) { file->f_mapping = h_file->f_mapping; diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c -index 3b217c2..0f5ab22 100644 +index 2d65b8f..5ed7903 100644 --- a/fs/aufs/loop.c +++ b/fs/aufs/loop.c @@ -133,3 +133,19 @@ void au_loopback_fin(void) @@ -186,7 +190,7 @@ index 3b217c2..0f5ab22 100644 + return f; +} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h -index 7d7bf34..ba7c188 100644 +index 05d703d..6bb23c8 100644 --- a/fs/aufs/loop.h +++ b/fs/aufs/loop.h @@ -26,7 +26,11 @@ void au_warn_loopback(struct super_block *h_sb); @@ -211,10 +215,10 @@ index 7d7bf34..ba7c188 100644 #endif /* __KERNEL__ */ diff --git a/fs/aufs/super.c b/fs/aufs/super.c -index 357bf04..c6614df 100644 +index eed37ba..a3a5cd7 100644 --- a/fs/aufs/super.c +++ b/fs/aufs/super.c -@@ -839,7 +839,10 @@ static const struct super_operations aufs_sop = { +@@ -840,7 +840,10 @@ static const struct super_operations aufs_sop = { .statfs = aufs_statfs, .put_super = aufs_put_super, .sync_fs = aufs_sync_fs, @@ -227,10 +231,10 @@ index 357bf04..c6614df 100644 /* ---------------------------------------------------------------------- */ diff --git a/include/linux/fs.h b/include/linux/fs.h -index 96e05b3..ba5e627 100644 +index 3a9d5b4..50a30c2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1840,6 +1840,10 @@ struct super_operations { +@@ -1861,6 +1861,10 @@ struct super_operations { struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); diff --git a/talimatname/genel/k/kernel/aufs4-mmap.patch b/talimatname/genel/k/kernel/aufs4-mmap.patch index cc0d69fe1..6ab364ff0 100644 --- a/talimatname/genel/k/kernel/aufs4-mmap.patch +++ b/talimatname/genel/k/kernel/aufs4-mmap.patch @@ -1,11 +1,11 @@ SPDX-License-Identifier: GPL-2.0 -aufs4.15 mmap patch +aufs4.17 mmap patch diff --git a/fs/proc/base.c b/fs/proc/base.c -index 60316b5..ce5314e 100644 +index 1a76d75..77f698e 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -1987,7 +1987,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) +@@ -2024,7 +2024,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) down_read(&mm->mmap_sem); vma = find_exact_vma(mm, vm_start, vm_end); if (vma && vma->vm_file) { @@ -31,10 +31,10 @@ index 7563437..7c0dc0f 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index 339e4c1..1138098 100644 +index c486ad4..76b71f8 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -306,7 +306,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) +@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) const char *name = NULL; if (file) { @@ -46,7 +46,7 @@ index 339e4c1..1138098 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1736,7 +1739,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1726,7 +1729,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -72,12 +72,12 @@ index 5b62f57..dfb4a3b 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/include/linux/mm.h b/include/linux/mm.h -index ea818ff..fbd4799 100644 +index 02a616e..01b3bb9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1362,6 +1362,28 @@ static inline int fixup_user_fault(struct task_struct *tsk, +@@ -1380,6 +1380,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, + unmap_mapping_range(mapping, holebegin, holelen, 0); } - #endif +extern void vma_do_file_update_time(struct vm_area_struct *, const char[], int); +extern struct file *vma_do_pr_or_file(struct vm_area_struct *, const char[], @@ -101,14 +101,14 @@ index ea818ff..fbd4799 100644 +#define vmr_fput(region) vmr_do_fput(region, __func__, __LINE__) +#endif /* !CONFIG_MMU */ + - extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, - unsigned int gup_flags); + extern int access_process_vm(struct task_struct *tsk, unsigned long addr, + void *buf, int len, unsigned int gup_flags); extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index cfd0ac4..135e11c 100644 +index 2161234..78aa367 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -255,6 +255,7 @@ struct vm_region { +@@ -251,6 +251,7 @@ struct vm_region { unsigned long vm_top; /* region allocated to here */ unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ struct file *vm_file; /* the backing file or NULL */ @@ -116,7 +116,7 @@ index cfd0ac4..135e11c 100644 int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -329,6 +330,7 @@ struct vm_area_struct { +@@ -325,6 +326,7 @@ struct vm_area_struct { unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE units */ struct file * vm_file; /* File we map to (can be NULL). */ @@ -125,10 +125,10 @@ index cfd0ac4..135e11c 100644 atomic_long_t swap_readahead_info; diff --git a/kernel/fork.c b/kernel/fork.c -index 2295fc6..80e1fee 100644 +index a5d21c4..e965e09 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -676,7 +676,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -473,7 +473,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -138,12 +138,12 @@ index 2295fc6..80e1fee 100644 atomic_dec(&inode->i_writecount); i_mmap_lock_write(mapping); diff --git a/mm/Makefile b/mm/Makefile -index e669f02..9c36567 100644 +index b4e54a9a..77892ae 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ mm_init.o mmu_context.o percpu.o slab_common.o \ - compaction.o vmacache.o swap_slots.o \ + compaction.o vmacache.o \ interval_tree.o list_lru.o workingset.o \ - debug.o $(mmu-y) + prfile.o debug.o $(mmu-y) @@ -151,10 +151,10 @@ index e669f02..9c36567 100644 obj-y += init-mm.o diff --git a/mm/filemap.c b/mm/filemap.c -index ee83baa..7677d13 100644 +index 0604cb0..45d2369 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -2704,7 +2704,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf) +@@ -2700,7 +2700,7 @@ int filemap_page_mkwrite(struct vm_fault *vmf) int ret = VM_FAULT_LOCKED; sb_start_pagefault(inode->i_sb); @@ -164,10 +164,10 @@ index ee83baa..7677d13 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index 9efdc021..d77f01f 100644 +index fc41c05..e376869 100644 --- a/mm/mmap.c +++ b/mm/mmap.c -@@ -171,7 +171,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) +@@ -180,7 +180,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -176,7 +176,7 @@ index 9efdc021..d77f01f 100644 mpol_put(vma_policy(vma)); kmem_cache_free(vm_area_cachep, vma); return next; -@@ -896,7 +896,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, +@@ -905,7 +905,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, if (remove_next) { if (file) { uprobe_munmap(next, next->vm_start, next->vm_end); @@ -185,7 +185,7 @@ index 9efdc021..d77f01f 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1761,8 +1761,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1820,8 +1820,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -195,7 +195,7 @@ index 9efdc021..d77f01f 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2586,7 +2586,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2645,7 +2645,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -204,7 +204,7 @@ index 9efdc021..d77f01f 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2605,7 +2605,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2664,7 +2664,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -213,7 +213,7 @@ index 9efdc021..d77f01f 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2767,7 +2767,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2826,7 +2826,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -222,7 +222,7 @@ index 9efdc021..d77f01f 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt.\n", current->comm, current->pid); -@@ -2842,10 +2842,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2901,10 +2901,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, } } @@ -251,7 +251,7 @@ index 9efdc021..d77f01f 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3153,7 +3170,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3220,7 +3237,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -261,10 +261,10 @@ index 9efdc021..d77f01f 100644 new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); diff --git a/mm/nommu.c b/mm/nommu.c -index 17c00d9..4bcdf94 100644 +index 1372373..6362dde 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -641,7 +641,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -629,7 +629,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); if (region->vm_file) @@ -273,7 +273,7 @@ index 17c00d9..4bcdf94 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -799,7 +799,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -767,7 +767,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -282,7 +282,7 @@ index 17c00d9..4bcdf94 100644 put_nommu_region(vma->vm_region); kmem_cache_free(vm_area_cachep, vma); } -@@ -1321,7 +1321,7 @@ unsigned long do_mmap(struct file *file, +@@ -1289,7 +1289,7 @@ unsigned long do_mmap(struct file *file, goto error_just_free; } } @@ -291,7 +291,7 @@ index 17c00d9..4bcdf94 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1396,10 +1396,10 @@ unsigned long do_mmap(struct file *file, +@@ -1364,10 +1364,10 @@ unsigned long do_mmap(struct file *file, up_write(&nommu_region_sem); error: if (region->vm_file) @@ -306,19 +306,19 @@ index 17c00d9..4bcdf94 100644 diff --git a/mm/prfile.c b/mm/prfile.c new file mode 100644 -index 0000000..3f56669 +index 0000000..a27ac36 --- /dev/null +++ b/mm/prfile.c @@ -0,0 +1,86 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * SPDX-License-Identifier: GPL-2.0 + * Mainly for aufs which mmap(2) different file and wants to print different + * path in /proc/PID/maps. + * Call these functions via macros defined in linux/mm.h. + * + * See Documentation/filesystems/aufs/design/06mmap.txt + * -+ * Copyright (c) 2014-2017 Junjro R. Okajima ++ * Copyright (c) 2014-2018 Junjro R. Okajima + * Copyright (c) 2014 Ian Campbell + */ + diff --git a/talimatname/genel/k/kernel/aufs4-standalone.patch b/talimatname/genel/k/kernel/aufs4-standalone.patch index 12986ee20..9a3d2f3d0 100644 --- a/talimatname/genel/k/kernel/aufs4-standalone.patch +++ b/talimatname/genel/k/kernel/aufs4-standalone.patch @@ -1,11 +1,11 @@ SPDX-License-Identifier: GPL-2.0 -aufs4.15 standalone patch +aufs4.17 standalone patch diff --git a/fs/dcache.c b/fs/dcache.c -index 019f14b..10c1a6d 100644 +index ff338e2..3e2bae8 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1305,6 +1305,7 @@ void d_walk(struct dentry *parent, void *data, +@@ -1342,6 +1342,7 @@ void d_walk(struct dentry *parent, void *data, seq = 1; goto again; } @@ -13,7 +13,7 @@ index 019f14b..10c1a6d 100644 struct check_mount { struct vfsmount *mnt; -@@ -2892,6 +2893,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) +@@ -2942,6 +2943,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) write_sequnlock(&rename_lock); } @@ -22,7 +22,7 @@ index 019f14b..10c1a6d 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index 7eb8d21..56d7985 100644 +index 183059c..35adee4 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -109,6 +109,7 @@ bool path_noexec(const struct path *path) @@ -34,7 +34,7 @@ index 7eb8d21..56d7985 100644 #ifdef CONFIG_USELIB /* diff --git a/fs/fcntl.c b/fs/fcntl.c -index 74c255d..ec53ee1 100644 +index 7550799..d403576 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -85,6 +85,7 @@ int setfl(int fd, struct file * filp, unsigned long arg) @@ -46,10 +46,10 @@ index 74c255d..ec53ee1 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) diff --git a/fs/file_table.c b/fs/file_table.c -index 2dc9f38..7bf57df 100644 +index 7ec0b3e..819ee07 100644 --- a/fs/file_table.c +++ b/fs/file_table.c -@@ -148,6 +148,7 @@ struct file *get_empty_filp(void) +@@ -147,6 +147,7 @@ struct file *get_empty_filp(void) } return ERR_PTR(-ENFILE); } @@ -57,7 +57,7 @@ index 2dc9f38..7bf57df 100644 /** * alloc_file - allocate and initialize a 'struct file' -@@ -258,6 +259,7 @@ void flush_delayed_fput(void) +@@ -257,6 +258,7 @@ void flush_delayed_fput(void) { delayed_fput(NULL); } @@ -65,7 +65,7 @@ index 2dc9f38..7bf57df 100644 static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput); -@@ -300,6 +302,7 @@ void __fput_sync(struct file *file) +@@ -299,6 +301,7 @@ void __fput_sync(struct file *file) } EXPORT_SYMBOL(fput); @@ -73,7 +73,7 @@ index 2dc9f38..7bf57df 100644 void put_filp(struct file *file) { -@@ -308,6 +311,7 @@ void put_filp(struct file *file) +@@ -307,6 +310,7 @@ void put_filp(struct file *file) file_free(file); } } @@ -82,10 +82,10 @@ index 2dc9f38..7bf57df 100644 void __init files_init(void) { diff --git a/fs/inode.c b/fs/inode.c -index 517883c..5cece5e 100644 +index e0c5255..ff36056 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -1664,6 +1664,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags) +@@ -1672,6 +1672,7 @@ int update_time(struct inode *inode, struct timespec *time, int flags) return update_time(inode, time, flags); } @@ -94,7 +94,7 @@ index 517883c..5cece5e 100644 /** * touch_atime - update the access time diff --git a/fs/namespace.c b/fs/namespace.c -index 26ef600..a4b9707 100644 +index 61129ff..5d3e0382 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *mnt) @@ -113,7 +113,7 @@ index 26ef600..a4b9707 100644 /* * vfsmount lock must be held for write -@@ -1887,6 +1889,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -1893,6 +1895,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, } return 0; } @@ -194,7 +194,7 @@ index e9191b4..1f8ccfa 100644 /* * Destroy all marks in destroy_list, waits for SRCU period to finish before diff --git a/fs/open.c b/fs/open.c -index 7ea1184..6e2e241 100644 +index d0e955b..527bc1a 100644 --- a/fs/open.c +++ b/fs/open.c @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, @@ -205,19 +205,19 @@ index 7ea1184..6e2e241 100644 long vfs_truncate(const struct path *path, loff_t length) { -@@ -691,6 +692,7 @@ int open_check_o_direct(struct file *f) - } - return 0; +@@ -723,6 +724,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) + { + return ksys_fchown(fd, user, group); } +EXPORT_SYMBOL_GPL(open_check_o_direct); - static int do_dentry_open(struct file *f, - struct inode *inode, + int open_check_o_direct(struct file *f) + { diff --git a/fs/read_write.c b/fs/read_write.c -index 0a5c47b..d423a5f 100644 +index ddd6e67..aabf92d 100644 --- a/fs/read_write.c +++ b/fs/read_write.c -@@ -454,6 +454,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) +@@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) return ret; } @@ -225,7 +225,7 @@ index 0a5c47b..d423a5f 100644 static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { -@@ -494,6 +495,7 @@ vfs_readf_t vfs_readf(struct file *file) +@@ -499,6 +500,7 @@ vfs_readf_t vfs_readf(struct file *file) return new_sync_read; return ERR_PTR(-ENOSYS); } @@ -233,7 +233,7 @@ index 0a5c47b..d423a5f 100644 vfs_writef_t vfs_writef(struct file *file) { -@@ -505,6 +507,7 @@ vfs_writef_t vfs_writef(struct file *file) +@@ -510,6 +512,7 @@ vfs_writef_t vfs_writef(struct file *file) return new_sync_write; return ERR_PTR(-ENOSYS); } @@ -241,7 +241,7 @@ index 0a5c47b..d423a5f 100644 ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) { -@@ -574,6 +577,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ +@@ -579,6 +582,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_ return ret; } @@ -250,7 +250,7 @@ index 0a5c47b..d423a5f 100644 static inline loff_t file_pos_read(struct file *file) { diff --git a/fs/splice.c b/fs/splice.c -index c5fb195..ce01a74 100644 +index f617ab0..ec0ad02 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -850,6 +850,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out, @@ -270,7 +270,7 @@ index c5fb195..ce01a74 100644 /** * splice_direct_to_actor - splices data directly between two non-pipes diff --git a/fs/sync.c b/fs/sync.c -index a6891ee..47a78bd 100644 +index 2860782..ffd7ea4 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -39,6 +39,7 @@ int __sync_filesystem(struct super_block *sb, int wait) @@ -294,7 +294,7 @@ index 61cd28b..35570cd 100644 ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 8b5f44d..979db63 100644 +index 06e0d7a..6af91bd 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -151,6 +151,7 @@ inline struct lock_class *lockdep_hlock_class(struct held_lock *hlock) @@ -315,10 +315,10 @@ index 0fef395..83fb1ec 100644 } +EXPORT_SYMBOL_GPL(task_work_run); diff --git a/security/commoncap.c b/security/commoncap.c -index 48620c9..4981104 100644 +index 1ce701f..a0d106e 100644 --- a/security/commoncap.c +++ b/security/commoncap.c -@@ -1330,12 +1330,14 @@ int cap_mmap_addr(unsigned long addr) +@@ -1332,12 +1332,14 @@ int cap_mmap_addr(unsigned long addr) } return ret; } @@ -351,10 +351,10 @@ index c65b39b..e363d22 100644 } +EXPORT_SYMBOL_GPL(__devcgroup_check_permission); diff --git a/security/security.c b/security/security.c -index 1cd8526..f2e4736 100644 +index 7bc2fde..6bd0468 100644 --- a/security/security.c +++ b/security/security.c -@@ -531,6 +531,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -537,6 +537,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -362,7 +362,7 @@ index 1cd8526..f2e4736 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -547,6 +548,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -553,6 +554,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, return 0; return call_int_hook(path_symlink, 0, dir, dentry, old_name); } @@ -370,7 +370,7 @@ index 1cd8526..f2e4736 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -555,6 +557,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -561,6 +563,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, return 0; return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); } @@ -378,7 +378,7 @@ index 1cd8526..f2e4736 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -582,6 +585,7 @@ int security_path_truncate(const struct path *path) +@@ -588,6 +591,7 @@ int security_path_truncate(const struct path *path) return 0; return call_int_hook(path_truncate, 0, path); } @@ -386,7 +386,7 @@ index 1cd8526..f2e4736 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -589,6 +593,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -595,6 +599,7 @@ int security_path_chmod(const struct path *path, umode_t mode) return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -394,7 +394,7 @@ index 1cd8526..f2e4736 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -596,6 +601,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -602,6 +607,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) return 0; return call_int_hook(path_chown, 0, path, uid, gid); } @@ -402,7 +402,7 @@ index 1cd8526..f2e4736 100644 int security_path_chroot(const struct path *path) { -@@ -681,6 +687,7 @@ int security_inode_readlink(struct dentry *dentry) +@@ -687,6 +693,7 @@ int security_inode_readlink(struct dentry *dentry) return 0; return call_int_hook(inode_readlink, 0, dentry); } @@ -410,7 +410,7 @@ index 1cd8526..f2e4736 100644 int security_inode_follow_link(struct dentry *dentry, struct inode *inode, bool rcu) -@@ -696,6 +703,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -702,6 +709,7 @@ int security_inode_permission(struct inode *inode, int mask) return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -418,7 +418,7 @@ index 1cd8526..f2e4736 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -867,6 +875,7 @@ int security_file_permission(struct file *file, int mask) +@@ -873,6 +881,7 @@ int security_file_permission(struct file *file, int mask) return fsnotify_perm(file, mask); } @@ -426,7 +426,7 @@ index 1cd8526..f2e4736 100644 int security_file_alloc(struct file *file) { -@@ -926,6 +935,7 @@ int security_mmap_file(struct file *file, unsigned long prot, +@@ -932,6 +941,7 @@ int security_mmap_file(struct file *file, unsigned long prot, return ret; return ima_file_mmap(file, prot); } diff --git a/talimatname/genel/k/kernel/aufs4.patch b/talimatname/genel/k/kernel/aufs4.patch index a13fd1031..032647554 100644 --- a/talimatname/genel/k/kernel/aufs4.patch +++ b/talimatname/genel/k/kernel/aufs4.patch @@ -1,7 +1,7 @@ -diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-4.15/Documentation/ABI/testing/debugfs-aufs +diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-4.17/Documentation/ABI/testing/debugfs-aufs --- /dev/null -+++ linux-4.15/Documentation/ABI/testing/debugfs-aufs 2018-02-25 02:38:09.195737146 +0100 -@@ -0,0 +1,50 @@ ++++ linux-4.17/Documentation/ABI/testing/debugfs-aufs 2018-07-25 15:11:05.122257770 +0200 +@@ -0,0 +1,55 @@ +What: /debug/aufs/si_/ +Date: March 2009 +Contact: J. R. Okajima @@ -32,15 +32,20 @@ diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-4.15/Documentation/ + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. + -+What: /debug/aufs/si_/xino0, xino1 ... xinoN ++What: /debug/aufs/si_/xi0, xi1 ... xiN and xiN-N +Date: March 2009 +Contact: J. R. Okajima +Description: + It shows the consumed blocks by xino (External Inode Number + Translation Table), its link count, block size and file + size. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see the aufs manual. ++ Due to the file size limit, there may exist multiple ++ xino files per branch. In this case, "-N" is added to ++ the filename and it corresponds to the index of the ++ internal xino array. "-0" is omitted. ++ When the aufs mount option 'noxino' is specified, Those ++ entries won't exist. About XINO files, see the aufs ++ manual. + +What: /debug/aufs/si_/xigen +Date: March 2009 @@ -52,9 +57,9 @@ diff -Naur null/Documentation/ABI/testing/debugfs-aufs linux-4.15/Documentation/ + be created. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-4.15/Documentation/ABI/testing/sysfs-aufs +diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-4.17/Documentation/ABI/testing/sysfs-aufs --- /dev/null -+++ linux-4.15/Documentation/ABI/testing/sysfs-aufs 2018-02-25 02:38:09.195737146 +0100 ++++ linux-4.17/Documentation/ABI/testing/sysfs-aufs 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,31 @@ +What: /sys/fs/aufs/si_/ +Date: March 2009 @@ -87,12 +92,12 @@ diff -Naur null/Documentation/ABI/testing/sysfs-aufs linux-4.15/Documentation/AB + even if it is the default path. + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. -diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-4.15/Documentation/filesystems/aufs/design/01intro.txt +diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-4.17/Documentation/filesystems/aufs/design/01intro.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/01intro.txt 2018-02-25 02:38:09.195737146 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/01intro.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,171 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -262,12 +267,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/01intro.txt linux-4.15/Doc +Some people may think it is better to pass such work to user space +helper, instead of doing in kernel space. Actually I am still thinking +about it. But currently I have implemented it in kernel space. -diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-4.15/Documentation/filesystems/aufs/design/02struct.txt +diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-4.17/Documentation/filesystems/aufs/design/02struct.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/02struct.txt 2018-02-25 02:38:09.195737146 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/02struct.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,258 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -524,12 +529,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/02struct.txt linux-4.15/Do +- etc. + +For this purpose, use "aumvdown" command in aufs-util.git. -diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-4.15/Documentation/filesystems/aufs/design/03atomic_open.txt +diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-4.17/Documentation/filesystems/aufs/design/03atomic_open.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/03atomic_open.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/03atomic_open.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,85 @@ + -+# Copyright (C) 2015-2017 Junjiro R. Okajima ++# Copyright (C) 2015-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -613,12 +618,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/03atomic_open.txt linux-4. + ->atomic_open() are lost. in the ordinary case, the checks are + done by VFS:do_last(), lookup_open() and atomic_open(). some can + be implemented in aufs, but not all I am afraid. -diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-4.15/Documentation/filesystems/aufs/design/03lookup.txt +diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-4.17/Documentation/filesystems/aufs/design/03lookup.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/03lookup.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/03lookup.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,113 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -730,12 +735,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/03lookup.txt linux-4.15/Do + test, and skip the revalidation in step 4. It is useful and improves + aufs performance when system surely hide the aufs branches from user, + by over-mounting something (or another method). -diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-4.15/Documentation/filesystems/aufs/design/04branch.txt +diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-4.17/Documentation/filesystems/aufs/design/04branch.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/04branch.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/04branch.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,74 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -808,12 +813,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/04branch.txt linux-4.15/Do + - a file on the branch is mmap-ed. + - a regular file on the branch is opened for write and there is no + same named entry on the upper branch. -diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-4.15/Documentation/filesystems/aufs/design/05wbr_policy.txt +diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-4.17/Documentation/filesystems/aufs/design/05wbr_policy.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/05wbr_policy.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/05wbr_policy.txt 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,64 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -876,9 +881,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/05wbr_policy.txt linux-4.1 + where the source and the target exists and selects the higher + one. If the selected branch is readonly, then aufs follows the + copyup policy. -diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-4.15/Documentation/filesystems/aufs/design/06dirren.dot +diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-4.17/Documentation/filesystems/aufs/design/06dirren.dot --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/06dirren.dot 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/06dirren.dot 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,31 @@ + +// to view this graph, run dot(1) command in GRAPHVIZ. @@ -911,12 +916,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/06dirren.dot linux-4.15/Do + +aufs_lookup -> whinfo [label="load/remove"]; +} -diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-4.15/Documentation/filesystems/aufs/design/06dirren.txt +diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-4.17/Documentation/filesystems/aufs/design/06dirren.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/06dirren.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/06dirren.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,102 @@ + -+# Copyright (C) 2017 Junjiro R. Okajima ++# Copyright (C) 2017-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1017,12 +1022,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/06dirren.txt linux-4.15/Do +contains two names, before- and after-rename, the name comparision in +UDBA handler may not work correctly. In this case, the behaviour will be +equivalen to udba=reval case. -diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-4.15/Documentation/filesystems/aufs/design/06fhsm.txt +diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-4.17/Documentation/filesystems/aufs/design/06fhsm.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/06fhsm.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/06fhsm.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,120 @@ + -+# Copyright (C) 2011-2017 Junjiro R. Okajima ++# Copyright (C) 2011-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1141,12 +1146,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/06fhsm.txt linux-4.15/Docu + +And of course, in every step, an error may happen. So the operation +should restore the original file state after an error happens. -diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-4.15/Documentation/filesystems/aufs/design/06mmap.txt +diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-4.17/Documentation/filesystems/aufs/design/06mmap.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/06mmap.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/06mmap.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,72 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1217,12 +1222,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/06mmap.txt linux-4.15/Docu + equivalent to vm_prfile described above. + +I have to give up this "looks-smater" approach. -diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-4.15/Documentation/filesystems/aufs/design/06xattr.txt +diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-4.17/Documentation/filesystems/aufs/design/06xattr.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/06xattr.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/06xattr.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,96 @@ + -+# Copyright (C) 2014-2017 Junjiro R. Okajima ++# Copyright (C) 2014-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1317,12 +1322,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/06xattr.txt linux-4.15/Doc +Some contradiction may happen I am afraid. +Do we need another attribute to stop copying XATTR? I am unsure. For +now, aufs implements the branch attributes to ignore the error. -diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-4.15/Documentation/filesystems/aufs/design/07export.txt +diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-4.17/Documentation/filesystems/aufs/design/07export.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/07export.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/07export.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,58 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1379,12 +1384,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/07export.txt linux-4.15/Do + convert it into ESTALE for NFSD. +- readdir(): call lockdep_on/off() because filldir in NFSD calls + lookup_one_len(), vfs_getattr(), encode_fh() and others. -diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-4.15/Documentation/filesystems/aufs/design/08shwh.txt +diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-4.17/Documentation/filesystems/aufs/design/08shwh.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/08shwh.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/08shwh.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,52 @@ + -+# Copyright (C) 2005-2017 Junjiro R. Okajima ++# Copyright (C) 2005-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1435,12 +1440,12 @@ diff -Naur null/Documentation/filesystems/aufs/design/08shwh.txt linux-4.15/Docu + +This new squashfs archive can be stored on the boot device and the +initramfs will use it to replace the old one at the next boot. -diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-4.15/Documentation/filesystems/aufs/design/10dynop.txt +diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-4.17/Documentation/filesystems/aufs/design/10dynop.txt --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/design/10dynop.txt 2018-02-25 02:38:09.196737254 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/design/10dynop.txt 2018-07-25 15:11:05.124257647 +0200 @@ -0,0 +1,47 @@ + -+# Copyright (C) 2010-2017 Junjiro R. Okajima ++# Copyright (C) 2010-2018 Junjiro R. Okajima +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by @@ -1486,9 +1491,9 @@ diff -Naur null/Documentation/filesystems/aufs/design/10dynop.txt linux-4.15/Doc +XIP (DAX) mainly. +Currently this approach is applied to address_space_operations for +regular files only. -diff -Naur null/Documentation/filesystems/aufs/README linux-4.15/Documentation/filesystems/aufs/README +diff -Naur null/Documentation/filesystems/aufs/README linux-4.17/Documentation/filesystems/aufs/README --- /dev/null -+++ linux-4.15/Documentation/filesystems/aufs/README 2018-02-25 02:38:09.195737146 +0100 ++++ linux-4.17/Documentation/filesystems/aufs/README 2018-07-25 15:11:05.123257708 +0200 @@ -0,0 +1,393 @@ + +Aufs4 -- advanced multi layered unification filesystem version 4.x @@ -1863,7 +1868,7 @@ diff -Naur null/Documentation/filesystems/aufs/README linux-4.15/Documentation/f +James B made a donation (2014/7 and 2015/7). +Stefano Di Biase made a donation (2014/8). +Daniel Epellei made a donation (2015/1). -+OmegaPhil made a donation (2016/1). ++OmegaPhil made a donation (2016/1, 2018/4). +Tomasz Szewczyk made a donation (2016/4). +James Burry made a donation (2016/12). + @@ -1883,12 +1888,13 @@ diff -Naur null/Documentation/filesystems/aufs/README linux-4.15/Documentation/f +# Local variables: ; +# mode: text; +# End: ; -diff -Naur null/fs/aufs/aufs.h linux-4.15/fs/aufs/aufs.h +diff -Naur null/fs/aufs/aufs.h linux-4.17/fs/aufs/aufs.h --- /dev/null -+++ linux-4.15/fs/aufs/aufs.h 2018-02-25 02:38:09.197737361 +0100 -@@ -0,0 +1,60 @@ ++++ linux-4.17/fs/aufs/aufs.h 2018-07-25 15:11:05.125257586 +0200 +@@ -0,0 +1,61 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -1947,12 +1953,13 @@ diff -Naur null/fs/aufs/aufs.h linux-4.15/fs/aufs/aufs.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_H__ */ -diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c +diff -Naur null/fs/aufs/branch.c linux-4.17/fs/aufs/branch.c --- /dev/null -+++ linux-4.15/fs/aufs/branch.c 2018-02-25 02:38:09.197737361 +0100 -@@ -0,0 +1,1432 @@ ++++ linux-4.17/fs/aufs/branch.c 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,1422 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -1988,12 +1995,7 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + au_hnotify_fin_br(br); + /* always, regardless the mount option */ + au_dr_hino_free(&br->br_dirren); -+ -+ if (br->br_xino.xi_file) -+ fput(br->br_xino.xi_file); -+ for (i = br->br_xino.xi_nondir.total - 1; i >= 0; i--) -+ AuDebugOn(br->br_xino.xi_nondir.array[i]); -+ kfree(br->br_xino.xi_nondir.array); ++ au_xino_put(br); + + AuDebugOn(au_br_count(br)); + au_br_count_fin(br); @@ -2090,16 +2092,12 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + add_branch = kzalloc(sizeof(*add_branch), GFP_NOFS); + if (unlikely(!add_branch)) + goto out; -+ add_branch->br_xino.xi_nondir.total = 8; /* initial size */ -+ add_branch->br_xino.xi_nondir.array -+ = kcalloc(add_branch->br_xino.xi_nondir.total, sizeof(ino_t), -+ GFP_NOFS); -+ if (unlikely(!add_branch->br_xino.xi_nondir.array)) ++ add_branch->br_xino = au_xino_alloc(); ++ if (unlikely(!add_branch->br_xino)) + goto out_br; -+ + err = au_hnotify_init_br(add_branch, perm); + if (unlikely(err)) -+ goto out_xinondir; ++ goto out_xino; + + if (au_br_writable(perm)) { + /* may be freed separately at changing the branch permission */ @@ -2131,8 +2129,8 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + kfree(add_branch->br_wbr); +out_hnotify: + au_hnotify_fin_br(add_branch); -+out_xinondir: -+ kfree(add_branch->br_xino.xi_nondir.array); ++out_xino: ++ au_xino_put(add_branch); +out_br: + kfree(add_branch); +out: @@ -2343,16 +2341,15 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + struct au_opt_add *add) +{ + int err; ++ struct au_branch *brbase; ++ struct file *xf; + struct inode *h_inode; + + err = 0; -+ spin_lock_init(&br->br_xino.xi_nondir.spin); -+ init_waitqueue_head(&br->br_xino.xi_nondir.wqh); + br->br_perm = add->perm; + br->br_path = add->path; /* set first, path_get() later */ + spin_lock_init(&br->br_dykey_lock); + au_br_count_init(br); -+ atomic_set(&br->br_xino_running, 0); + br->br_id = au_new_br_id(sb); + AuDebugOn(br->br_id < 0); + @@ -2368,11 +2365,13 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + } + + if (au_opt_test(au_mntflags(sb), XINO)) { ++ brbase = au_sbr(sb, 0); ++ xf = au_xino_file(brbase); ++ AuDebugOn(!xf); + h_inode = d_inode(add->path.dentry); -+ err = au_xino_br(sb, br, h_inode->i_ino, -+ au_sbr(sb, 0)->br_xino.xi_file, /*do_test*/1); ++ err = au_xino_init_br(sb, br, h_inode->i_ino, &xf->f_path); + if (unlikely(err)) { -+ AuDebugOn(br->br_xino.xi_file); ++ AuDebugOn(au_xino_file(br)); + goto out_err; + } + } @@ -2462,6 +2461,7 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + struct dentry *root, *h_dentry; + struct inode *root_inode; + struct au_branch *add_branch; ++ struct file *xf; + + root = sb->s_root; + root_inode = d_inode(root); @@ -2488,13 +2488,10 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + } + + add_bindex = add->bindex; -+ if (!remount) -+ au_br_do_add(sb, add_branch, add_bindex); -+ else { -+ sysaufs_brs_del(sb, add_bindex); -+ au_br_do_add(sb, add_branch, add_bindex); -+ sysaufs_brs_add(sb, add_bindex); -+ } ++ sysaufs_brs_del(sb, add_bindex); /* remove successors */ ++ au_br_do_add(sb, add_branch, add_bindex); ++ sysaufs_brs_add(sb, add_bindex); /* append successors */ ++ dbgaufs_brs_add(sb, add_bindex, /*topdown*/0); /* rename successors */ + + h_dentry = add->path.dentry; + if (!add_bindex) { @@ -2504,16 +2501,17 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + au_add_nlink(root_inode, d_inode(h_dentry)); + + /* -+ * this test/set prevents aufs from handling unnecesary notify events ++ * this test/set prevents aufs from handling unnecessary notify events + * of xino files, in case of re-adding a writable branch which was + * once detached from aufs. + */ + if (au_xino_brid(sb) < 0 + && au_br_writable(add_branch->br_perm) -+ && !au_test_fs_bad_xino(h_dentry->d_sb) -+ && add_branch->br_xino.xi_file -+ && add_branch->br_xino.xi_file->f_path.dentry->d_parent == h_dentry) -+ au_xino_brid_set(sb, add_branch->br_id); ++ && !au_test_fs_bad_xino(h_dentry->d_sb)) { ++ xf = au_xino_file(add_branch); ++ if (xf && xf->f_path.dentry->d_parent == h_dentry) ++ au_xino_brid_set(sb, add_branch->br_id); ++ } + +out: + return err; @@ -2816,7 +2814,7 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c +} + +static void br_del_file(struct file **to_free, unsigned long long opened, -+ aufs_bindex_t br_id) ++ aufs_bindex_t br_id) +{ + unsigned long long ull; + aufs_bindex_t bindex, btop, bbot, bfound; @@ -3043,13 +3041,11 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + di_write_lock_child(root); + } + -+ if (!remount) -+ au_br_do_del(sb, bindex, br); -+ else { -+ sysaufs_brs_del(sb, bindex); -+ au_br_do_del(sb, bindex, br); -+ sysaufs_brs_add(sb, bindex); -+ } ++ sysaufs_brs_del(sb, bindex); /* remove successors */ ++ dbgaufs_xino_del(br); /* remove one */ ++ au_br_do_del(sb, bindex, br); ++ sysaufs_brs_add(sb, bindex); /* append successors */ ++ dbgaufs_brs_add(sb, bindex, /*topdown*/1); /* rename successors */ + + if (!bindex) { + au_cpup_attr_all(d_inode(root), /*force*/1); @@ -3383,12 +3379,13 @@ diff -Naur null/fs/aufs/branch.c linux-4.15/fs/aufs/branch.c + + return err; +} -diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h +diff -Naur null/fs/aufs/branch.h linux-4.17/fs/aufs/branch.h --- /dev/null -+++ linux-4.15/fs/aufs/branch.h 2018-02-25 02:38:09.197737361 +0100 -@@ -0,0 +1,333 @@ ++++ linux-4.17/fs/aufs/branch.h 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,374 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -3422,7 +3419,7 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h +/* ---------------------------------------------------------------------- */ + +/* a xino file */ -+struct au_xino_file { ++struct au_xino { + struct file *xi_file; + struct { + spinlock_t spin; @@ -3433,11 +3430,11 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + wait_queue_head_t wqh; + } xi_nondir; + -+ /* todo: make xino files an array to support huge inode number */ ++ atomic_t xi_truncating; + -+#ifdef CONFIG_DEBUG_FS -+ struct dentry *xi_dbgaufs; -+#endif ++ struct kref xi_kref; ++ ++ /* todo: make xino files an array to support huge inode number */ +}; + +/* File-based Hierarchical Storage Management */ @@ -3488,7 +3485,7 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + +/* protected by superblock rwsem */ +struct au_branch { -+ struct au_xino_file br_xino; ++ struct au_xino *br_xino; + + aufs_bindex_t br_id; + @@ -3501,9 +3498,6 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + struct au_wbr *br_wbr; + struct au_br_fhsm *br_fhsm; + -+ /* xino truncation */ -+ atomic_t br_xino_running; -+ +#ifdef CONFIG_AUFS_HFSNOTIFY + struct au_br_hfsnotify *br_hfsn; +#endif @@ -3513,6 +3507,10 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + struct au_brsysfs br_sysfs[AuBrSysfs_Last]; +#endif + ++#ifdef CONFIG_DEBUG_FS ++ struct dentry *br_dbgaufs; /* xino */ ++#endif ++ + struct au_dr_br br_dirren; +}; + @@ -3586,6 +3584,36 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + return err; +} + ++static inline void au_xino_get(struct au_branch *br) ++{ ++ struct au_xino *xi; ++ ++ xi = br->br_xino; ++ if (xi) ++ kref_get(&xi->xi_kref); ++} ++ ++static inline int au_xino_count(struct au_branch *br) ++{ ++ int v; ++ struct au_xino *xi; ++ ++ v = 0; ++ xi = br->br_xino; ++ if (xi) ++ v = kref_read(&xi->xi_kref); ++ ++ return v; ++} ++ ++static inline struct file *au_xino_file(struct au_branch *br) ++{ ++ struct au_xino *xi; ++ ++ xi = br->br_xino; ++ return xi ? xi->xi_file : NULL; ++} ++ +/* ---------------------------------------------------------------------- */ + +/* branch.c */ @@ -3609,34 +3637,43 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h +/* xino.c */ +static const loff_t au_loff_max = LLONG_MAX; + -+int au_xib_trunc(struct super_block *sb); ++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent); ++struct file *au_xino_create2(struct super_block *sb, struct path *base, ++ struct file *copy_src); ++ ++int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t *ino); ++int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t ino); +ssize_t xino_fread(vfs_readf_t func, struct file *file, void *buf, size_t size, + loff_t *pos); +ssize_t xino_fwrite(vfs_writef_t func, struct file *file, void *buf, + size_t size, loff_t *pos); -+struct file *au_xino_create2(struct file *base_file, struct file *copy_src); -+struct file *au_xino_create(struct super_block *sb, char *fname, int silent); -+ino_t au_xino_new_ino(struct super_block *sb); -+void au_xino_delete_inode(struct inode *inode, const int unlinked); -+int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t ino); -+int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t *ino); -+int au_xino_br(struct super_block *sb, struct au_branch *br, ino_t hino, -+ struct file *base_file, int do_test); ++ ++int au_xib_trunc(struct super_block *sb); +int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex); + ++struct au_xino *au_xino_alloc(void); ++int au_xino_put(struct au_branch *br); ++void au_xino_file_set(struct au_branch *br, struct file *file); ++ +struct au_opt_xino; -+int au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount); +void au_xino_clr(struct super_block *sb); ++int au_xino_set(struct super_block *sb, struct au_opt_xino *xiopt, int remount); +struct file *au_xino_def(struct super_block *sb); -+int au_xino_path(struct seq_file *seq, struct file *file); ++int au_xino_init_br(struct super_block *sb, struct au_branch *br, ino_t hino, ++ struct path *base); ++ ++ino_t au_xino_new_ino(struct super_block *sb); ++void au_xino_delete_inode(struct inode *inode, const int unlinked); + +void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, + ino_t h_ino, int idx); +int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, + int *idx); + ++int au_xino_path(struct seq_file *seq, struct file *file); ++ +/* ---------------------------------------------------------------------- */ + +/* Superblock to branch */ @@ -3720,9 +3757,9 @@ diff -Naur null/fs/aufs/branch.h linux-4.15/fs/aufs/branch.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_BRANCH_H__ */ -diff -Naur null/fs/aufs/conf.mk linux-4.15/fs/aufs/conf.mk +diff -Naur null/fs/aufs/conf.mk linux-4.17/fs/aufs/conf.mk --- /dev/null -+++ linux-4.15/fs/aufs/conf.mk 2018-02-25 02:38:09.197737361 +0100 ++++ linux-4.17/fs/aufs/conf.mk 2018-07-25 15:11:05.126257525 +0200 @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -3764,12 +3801,13 @@ diff -Naur null/fs/aufs/conf.mk linux-4.15/fs/aufs/conf.mk +${obj}/sysfs.o: ${AuConfName} + +-include ${srctree}/${src}/conf_priv.mk -diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c +diff -Naur null/fs/aufs/cpup.c linux-4.17/fs/aufs/cpup.c --- /dev/null -+++ linux-4.15/fs/aufs/cpup.c 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,1442 @@ ++++ linux-4.17/fs/aufs/cpup.c 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,1441 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -4150,7 +4188,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + else { + inode_unlock_shared(h_src_inode); + err = au_copy_file(dst, src, len); -+ vfsub_inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); + } + + return err; @@ -4173,7 +4211,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + if (!au_test_nfs(h_src_sb)) { + inode_unlock_shared(h_src_inode); + err = vfsub_clone_file_range(src, dst, len); -+ vfsub_inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); + } else + err = vfsub_clone_file_range(src, dst, len); + /* older XFS has a condition in cloning */ @@ -4243,7 +4281,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + if (tsk->flags & PF_KTHREAD) + __fput_sync(file[DST].file); + else { -+ /* it happend actually */ ++ /* it happened actually */ + fput(file[DST].file); + /* + * too bad. @@ -4277,7 +4315,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + cpg->len = l; + if (cpg->len) { + /* try stopping to update while we are referencing */ -+ vfsub_inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); + au_pin_hdir_unlock(cpg->pin); + + h_path.dentry = au_h_dptr(cpg->dentry, cpg->bsrc); @@ -4288,8 +4326,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + else { + inode_unlock_shared(h_src_inode); + err = vfsub_getattr(&h_path, &h_src_attr->st); -+ vfsub_inode_lock_shared_nested(h_src_inode, -+ AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_src_inode, AuLsc_I_CHILD); + } + if (unlikely(err)) { + inode_unlock_shared(h_src_inode); @@ -4446,8 +4483,7 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + switch (mode & S_IFMT) { + case S_IFREG: + isreg = 1; -+ err = vfsub_create(h_dir, &h_path, S_IRUSR | S_IWUSR, -+ /*want_excl*/true); ++ err = vfsub_create(h_dir, &h_path, 0600, /*want_excl*/true); + if (!err) + err = au_do_cpup_regular(cpg, h_src_attr); + break; @@ -5210,12 +5246,13 @@ diff -Naur null/fs/aufs/cpup.c linux-4.15/fs/aufs/cpup.c + dput(parent); + return err; +} -diff -Naur null/fs/aufs/cpup.h linux-4.15/fs/aufs/cpup.h +diff -Naur null/fs/aufs/cpup.h linux-4.17/fs/aufs/cpup.h --- /dev/null -+++ linux-4.15/fs/aufs/cpup.h 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,99 @@ ++++ linux-4.17/fs/aufs/cpup.h 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,100 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -5313,12 +5350,13 @@ diff -Naur null/fs/aufs/cpup.h linux-4.15/fs/aufs/cpup.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_CPUP_H__ */ -diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c +diff -Naur null/fs/aufs/dbgaufs.c linux-4.17/fs/aufs/dbgaufs.c --- /dev/null -+++ linux-4.15/fs/aufs/dbgaufs.c 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,437 @@ ++++ linux-4.17/fs/aufs/dbgaufs.c 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,478 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -5346,7 +5384,7 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c +#endif + +static struct dentry *dbgaufs; -+static const mode_t dbgaufs_mode = S_IRUSR | S_IRGRP | S_IROTH; ++static const mode_t dbgaufs_mode = 0444; + +/* 20 is max digits length of ulong 64 */ +struct dbgaufs_arg { @@ -5364,7 +5402,8 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + return 0; +} + -+static int dbgaufs_xi_open(struct file *xf, struct file *file, int do_fcnt) ++static int dbgaufs_xi_open(struct file *xf, struct file *file, int do_fcnt, ++ int cnt) +{ + int err; + struct kstat st; @@ -5385,8 +5424,8 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + if (!err) { + if (do_fcnt) + p->n = snprintf -+ (p->a, sizeof(p->a), "%ld, %llux%u %lld\n", -+ (long)file_count(xf), st.blocks, st.blksize, ++ (p->a, sizeof(p->a), "%d, %llux%u %lld\n", ++ cnt, st.blocks, st.blksize, + (long long)st.size); + else + p->n = snprintf(p->a, sizeof(p->a), "%llux%u %lld\n", @@ -5517,7 +5556,7 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + sbinfo = inode->i_private; + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); -+ err = dbgaufs_xi_open(sbinfo->si_xib, file, /*do_fcnt*/0); ++ err = dbgaufs_xi_open(sbinfo->si_xib, file, /*do_fcnt*/0, /*cnt*/0); + si_read_unlock(sb); + return err; +} @@ -5541,6 +5580,7 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + struct super_block *sb; + struct file *xf; + struct qstr *name; ++ struct au_branch *br; + + err = -ENOENT; + xf = NULL; @@ -5557,8 +5597,10 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); + if (l <= au_sbbot(sb)) { -+ xf = au_sbr(sb, (aufs_bindex_t)l)->br_xino.xi_file; -+ err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1); ++ br = au_sbr(sb, (aufs_bindex_t)l); ++ xf = au_xino_file(br); ++ err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1, ++ au_xino_count(br)); + } else + err = -ENOENT; + si_read_unlock(sb); @@ -5574,11 +5616,25 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + .read = dbgaufs_xi_read +}; + ++void dbgaufs_xino_del(struct au_branch *br) ++{ ++ struct dentry *dbgaufs; ++ ++ dbgaufs = br->br_dbgaufs; ++ if (!dbgaufs) ++ return; ++ ++ br->br_dbgaufs = NULL; ++ /* debugfs acquires the parent i_mutex */ ++ lockdep_off(); ++ debugfs_remove(dbgaufs); ++ lockdep_on(); ++} ++ +void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex) +{ + aufs_bindex_t bbot; + struct au_branch *br; -+ struct au_xino_file *xi; + + if (!au_sbi(sb)->si_dbgaufs) + return; @@ -5586,23 +5642,51 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + bbot = au_sbbot(sb); + for (; bindex <= bbot; bindex++) { + br = au_sbr(sb, bindex); -+ xi = &br->br_xino; -+ /* debugfs acquires the parent i_mutex */ -+ lockdep_off(); -+ debugfs_remove(xi->xi_dbgaufs); -+ lockdep_on(); -+ xi->xi_dbgaufs = NULL; ++ dbgaufs_xino_del(br); + } +} + -+void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex) ++static void dbgaufs_br_add(struct super_block *sb, aufs_bindex_t bindex, ++ struct dentry *parent, struct au_sbinfo *sbinfo) ++{ ++ struct au_branch *br; ++ struct dentry *d; ++ char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */ ++ ++ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); ++ br = au_sbr(sb, bindex); ++ if (br->br_dbgaufs) { ++ struct qstr qstr = QSTR_INIT(name, strlen(name)); ++ ++ if (!au_qstreq(&br->br_dbgaufs->d_name, &qstr)) { ++ /* debugfs acquires the parent i_mutex */ ++ lockdep_off(); ++ d = debugfs_rename(parent, br->br_dbgaufs, parent, ++ name); ++ lockdep_on(); ++ if (unlikely(!d)) ++ pr_warn("failed renaming %pd/%s, ignored.\n", ++ parent, name); ++ } ++ } else { ++ lockdep_off(); ++ br->br_dbgaufs = debugfs_create_file(name, dbgaufs_mode, parent, ++ sbinfo, &dbgaufs_xino_fop); ++ lockdep_on(); ++ if (unlikely(!br->br_dbgaufs)) ++ pr_warn("failed creaiting %pd/%s, ignored.\n", ++ parent, name); ++ } ++} ++ ++void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex, int topdown) +{ + struct au_sbinfo *sbinfo; + struct dentry *parent; -+ struct au_branch *br; -+ struct au_xino_file *xi; + aufs_bindex_t bbot; -+ char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */ ++ ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return; + + sbinfo = au_sbi(sb); + parent = sbinfo->si_dbgaufs; @@ -5610,20 +5694,12 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + return; + + bbot = au_sbbot(sb); -+ for (; bindex <= bbot; bindex++) { -+ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); -+ br = au_sbr(sb, bindex); -+ xi = &br->br_xino; -+ AuDebugOn(xi->xi_dbgaufs); -+ /* debugfs acquires the parent i_mutex */ -+ lockdep_off(); -+ xi->xi_dbgaufs = debugfs_create_file(name, dbgaufs_mode, parent, -+ sbinfo, &dbgaufs_xino_fop); -+ lockdep_on(); -+ /* ignore an error */ -+ if (unlikely(!xi->xi_dbgaufs)) -+ AuWarn1("failed %s under debugfs\n", name); -+ } ++ if (topdown) ++ for (; bindex <= bbot; bindex++) ++ dbgaufs_br_add(sb, bindex, parent, sbinfo); ++ else ++ for (; bbot >= bindex; bbot--) ++ dbgaufs_br_add(sb, bbot, parent, sbinfo); +} + +/* ---------------------------------------------------------------------- */ @@ -5638,7 +5714,7 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + sbinfo = inode->i_private; + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); -+ err = dbgaufs_xi_open(sbinfo->si_xigen, file, /*do_fcnt*/0); ++ err = dbgaufs_xi_open(sbinfo->si_xigen, file, /*do_fcnt*/0, /*cnt*/0); + si_read_unlock(sb); + return err; +} @@ -5688,7 +5764,6 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + + debugfs_remove_recursive(sbinfo->si_dbgaufs); + sbinfo->si_dbgaufs = NULL; -+ kobject_put(&sbinfo->si_kobj); +} + +int dbgaufs_si_init(struct au_sbinfo *sbinfo) @@ -5713,20 +5788,21 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + sbinfo->si_dbgaufs = debugfs_create_dir(name, dbgaufs); + if (unlikely(!sbinfo->si_dbgaufs)) + goto out; -+ kobject_get(&sbinfo->si_kobj); -+ -+ sbinfo->si_dbgaufs_xib = debugfs_create_file -+ ("xib", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, -+ &dbgaufs_xib_fop); -+ if (unlikely(!sbinfo->si_dbgaufs_xib)) -+ goto out_dir; + ++ /* regardless plink/noplink option */ + sbinfo->si_dbgaufs_plink = debugfs_create_file + ("plink", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, + &dbgaufs_plink_fop); + if (unlikely(!sbinfo->si_dbgaufs_plink)) + goto out_dir; + ++ /* regardless xino/noxino option */ ++ sbinfo->si_dbgaufs_xib = debugfs_create_file ++ ("xib", dbgaufs_mode, sbinfo->si_dbgaufs, sbinfo, ++ &dbgaufs_xib_fop); ++ if (unlikely(!sbinfo->si_dbgaufs_xib)) ++ goto out_dir; ++ + err = dbgaufs_xigen_init(sbinfo); + if (!err) + goto out; /* success */ @@ -5734,6 +5810,8 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c +out_dir: + dbgaufs_si_fin(sbinfo); +out: ++ if (unlikely(err)) ++ pr_err("debugfs/aufs failed\n"); + return err; +} + @@ -5754,12 +5832,13 @@ diff -Naur null/fs/aufs/dbgaufs.c linux-4.15/fs/aufs/dbgaufs.c + err = 0; + return err; +} -diff -Naur null/fs/aufs/dbgaufs.h linux-4.15/fs/aufs/dbgaufs.h +diff -Naur null/fs/aufs/dbgaufs.h linux-4.17/fs/aufs/dbgaufs.h --- /dev/null -+++ linux-4.15/fs/aufs/dbgaufs.h 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,48 @@ ++++ linux-4.17/fs/aufs/dbgaufs.h 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,53 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -5786,18 +5865,22 @@ diff -Naur null/fs/aufs/dbgaufs.h linux-4.15/fs/aufs/dbgaufs.h + +struct super_block; +struct au_sbinfo; ++struct au_branch; + +#ifdef CONFIG_DEBUG_FS +/* dbgaufs.c */ ++void dbgaufs_xino_del(struct au_branch *br); +void dbgaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex); -+void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex); ++void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex, int topdown); +void dbgaufs_si_fin(struct au_sbinfo *sbinfo); +int dbgaufs_si_init(struct au_sbinfo *sbinfo); +void dbgaufs_fin(void); +int __init dbgaufs_init(void); +#else ++AuStubVoid(dbgaufs_xino_del, struct au_branch *br) +AuStubVoid(dbgaufs_brs_del, struct super_block *sb, aufs_bindex_t bindex) -+AuStubVoid(dbgaufs_brs_add, struct super_block *sb, aufs_bindex_t bindex) ++AuStubVoid(dbgaufs_brs_add, struct super_block *sb, aufs_bindex_t bindex, ++ int topdown) +AuStubVoid(dbgaufs_si_fin, struct au_sbinfo *sbinfo) +AuStubInt0(dbgaufs_si_init, struct au_sbinfo *sbinfo) +AuStubVoid(dbgaufs_fin, void) @@ -5806,12 +5889,13 @@ diff -Naur null/fs/aufs/dbgaufs.h linux-4.15/fs/aufs/dbgaufs.h + +#endif /* __KERNEL__ */ +#endif /* __DBGAUFS_H__ */ -diff -Naur null/fs/aufs/dcsub.c linux-4.15/fs/aufs/dcsub.c +diff -Naur null/fs/aufs/dcsub.c linux-4.17/fs/aufs/dcsub.c --- /dev/null -+++ linux-4.15/fs/aufs/dcsub.c 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,225 @@ ++++ linux-4.17/fs/aufs/dcsub.c 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,226 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6035,12 +6119,13 @@ diff -Naur null/fs/aufs/dcsub.c linux-4.15/fs/aufs/dcsub.c + + return path_is_under(path + 0, path + 1); +} -diff -Naur null/fs/aufs/dcsub.h linux-4.15/fs/aufs/dcsub.h +diff -Naur null/fs/aufs/dcsub.h linux-4.17/fs/aufs/dcsub.h --- /dev/null -+++ linux-4.15/fs/aufs/dcsub.h 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,136 @@ ++++ linux-4.17/fs/aufs/dcsub.h 2018-07-25 15:11:05.126257525 +0200 +@@ -0,0 +1,137 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6175,12 +6260,13 @@ diff -Naur null/fs/aufs/dcsub.h linux-4.15/fs/aufs/dcsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DCSUB_H__ */ -diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c +diff -Naur null/fs/aufs/debug.c linux-4.17/fs/aufs/debug.c --- /dev/null -+++ linux-4.15/fs/aufs/debug.c 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,440 @@ ++++ linux-4.17/fs/aufs/debug.c 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,441 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6234,7 +6320,7 @@ diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c + +atomic_t aufs_debug = ATOMIC_INIT(0); +MODULE_PARM_DESC(debug, "debug print"); -+module_param_named(debug, aufs_debug, atomic_t, S_IRUGO | S_IWUSR | S_IWGRP); ++module_param_named(debug, aufs_debug, atomic_t, 0664); + +DEFINE_MUTEX(au_dbg_mtx); /* just to serialize the dbg msgs */ +char *au_plevel = KERN_DEBUG; @@ -6276,7 +6362,7 @@ diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c + return; + } + -+ dpri("deblk %u, nblk %lu, deblk %p, last{%lu, %p}, ver %lu\n", ++ dpri("deblk %u, nblk %lu, deblk %p, last{%lu, %p}, ver %llu\n", + vdir->vd_deblk_sz, vdir->vd_nblk, vdir->vd_deblk, + vdir->vd_last.ul, vdir->vd_last.p.deblk, vdir->vd_version); + for (ul = 0; ul < vdir->vd_nblk; ul++) { @@ -6313,7 +6399,7 @@ diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c + i_size_read(inode), (unsigned long long)inode->i_blocks, + hn, (long long)timespec_to_ns(&inode->i_ctime) & 0x0ffff, + inode->i_mapping ? inode->i_mapping->nrpages : 0, -+ inode->i_state, inode->i_flags, inode->i_version, ++ inode->i_state, inode->i_flags, inode_peek_iversion(inode), + inode->i_generation, + l ? ", wh " : "", l, n); + return 0; @@ -6486,7 +6572,7 @@ diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c + bindex, br->br_perm, br->br_id, au_br_count(br), + br->br_wbr, au_sbtype(sb), MAJOR(sb->s_dev), MINOR(sb->s_dev), + sb->s_flags, sb->s_count, -+ atomic_read(&sb->s_active), !!br->br_xino.xi_file); ++ atomic_read(&sb->s_active), !!au_xino_file(br)); + return 0; + +out: @@ -6619,12 +6705,13 @@ diff -Naur null/fs/aufs/debug.c linux-4.15/fs/aufs/debug.c + + return 0; +} -diff -Naur null/fs/aufs/debug.h linux-4.15/fs/aufs/debug.h +diff -Naur null/fs/aufs/debug.h linux-4.17/fs/aufs/debug.h --- /dev/null -+++ linux-4.15/fs/aufs/debug.h 2018-02-25 02:38:09.198737468 +0100 -@@ -0,0 +1,225 @@ ++++ linux-4.17/fs/aufs/debug.h 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,226 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6848,12 +6935,13 @@ diff -Naur null/fs/aufs/debug.h linux-4.15/fs/aufs/debug.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DEBUG_H__ */ -diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c +diff -Naur null/fs/aufs/dentry.c linux-4.17/fs/aufs/dentry.c --- /dev/null -+++ linux-4.15/fs/aufs/dentry.c 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,1152 @@ ++++ linux-4.17/fs/aufs/dentry.c 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,1153 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -6948,7 +7036,7 @@ diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c + || (d_really_is_positive(dentry) && !d_is_dir(dentry))) + goto out; /* success */ + -+ vfsub_inode_lock_shared_nested(h_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_inode, AuLsc_I_CHILD); + opq = au_diropq_test(h_dentry); + inode_unlock_shared(h_inode); + if (opq > 0) @@ -7033,7 +7121,7 @@ diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c + } + + h_dir = d_inode(h_parent); -+ vfsub_inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); ++ inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); + h_dentry = au_do_lookup(h_parent, dentry, bindex, &args); + inode_unlock_shared(h_dir); + err = PTR_ERR(h_dentry); @@ -7176,7 +7264,7 @@ diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c + /* ia->i_nlink = h_inode->i_nlink; */ + ia->i_uid = h_inode->i_uid; + ia->i_gid = h_inode->i_gid; -+ ia->i_version = h_inode->i_version; ++ ia->i_version = inode_query_iversion(h_inode); +/* + ia->i_size = h_inode->i_size; + ia->i_blocks = h_inode->i_blocks; @@ -7190,7 +7278,7 @@ diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c + /* || ia->i_nlink != h_inode->i_nlink */ + || !uid_eq(ia->i_uid, h_inode->i_uid) + || !gid_eq(ia->i_gid, h_inode->i_gid) -+ || ia->i_version != h_inode->i_version ++ || !inode_eq_iversion(h_inode, ia->i_version) +/* + || ia->i_size != h_inode->i_size + || ia->i_blocks != h_inode->i_blocks @@ -8004,12 +8092,13 @@ diff -Naur null/fs/aufs/dentry.c linux-4.15/fs/aufs/dentry.c +const struct dentry_operations aufs_dop_noreval = { + .d_release = aufs_d_release +}; -diff -Naur null/fs/aufs/dentry.h linux-4.15/fs/aufs/dentry.h +diff -Naur null/fs/aufs/dentry.h linux-4.17/fs/aufs/dentry.h --- /dev/null -+++ linux-4.15/fs/aufs/dentry.h 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,266 @@ ++++ linux-4.17/fs/aufs/dentry.h 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,267 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -8274,12 +8363,13 @@ diff -Naur null/fs/aufs/dentry.h linux-4.15/fs/aufs/dentry.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DENTRY_H__ */ -diff -Naur null/fs/aufs/dinfo.c linux-4.15/fs/aufs/dinfo.c +diff -Naur null/fs/aufs/dinfo.c linux-4.17/fs/aufs/dinfo.c --- /dev/null -+++ linux-4.15/fs/aufs/dinfo.c 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,553 @@ ++++ linux-4.17/fs/aufs/dinfo.c 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,554 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -8831,12 +8921,13 @@ diff -Naur null/fs/aufs/dinfo.c linux-4.15/fs/aufs/dinfo.c + return bindex; + return -1; +} -diff -Naur null/fs/aufs/dir.c linux-4.15/fs/aufs/dir.c +diff -Naur null/fs/aufs/dir.c linux-4.17/fs/aufs/dir.c --- /dev/null -+++ linux-4.15/fs/aufs/dir.c 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,759 @@ ++++ linux-4.17/fs/aufs/dir.c 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,760 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -9095,7 +9186,7 @@ diff -Naur null/fs/aufs/dir.c linux-4.15/fs/aufs/dir.c + err = 0; + mnt = file->f_path.mnt; + dentry = file->f_path.dentry; -+ file->f_version = d_inode(dentry)->i_version; ++ file->f_version = inode_query_iversion(d_inode(dentry)); + bindex = au_dbtop(dentry); + au_set_fbtop(file, bindex); + btail = au_dbtaildir(dentry); @@ -9313,7 +9404,7 @@ diff -Naur null/fs/aufs/dir.c linux-4.15/fs/aufs/dir.c + struct inode *inode, *h_inode; + struct super_block *sb; + -+ AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos); ++ AuDbg("%pD, ctx{%ps, %llu}\n", file, ctx->actor, ctx->pos); + + dentry = file->f_path.dentry; + inode = d_inode(dentry); @@ -9474,7 +9565,7 @@ diff -Naur null/fs/aufs/dir.c linux-4.15/fs/aufs/dir.c + h_dentry = au_h_dptr(dentry, arg->bindex); + h_inode = d_inode(h_dentry); + /* todo: i_mode changes anytime? */ -+ vfsub_inode_lock_shared_nested(h_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_inode, AuLsc_I_CHILD); + err = au_test_h_perm_sio(h_inode, MAY_EXEC | MAY_READ); + inode_unlock_shared(h_inode); + if (!err) @@ -9594,12 +9685,13 @@ diff -Naur null/fs/aufs/dir.c linux-4.15/fs/aufs/dir.c + .flush = aufs_flush_dir, + .fsync = aufs_fsync_dir +}; -diff -Naur null/fs/aufs/dir.h linux-4.15/fs/aufs/dir.h +diff -Naur null/fs/aufs/dir.h linux-4.17/fs/aufs/dir.h --- /dev/null -+++ linux-4.15/fs/aufs/dir.h 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,131 @@ ++++ linux-4.17/fs/aufs/dir.h 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,132 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -9678,7 +9770,7 @@ diff -Naur null/fs/aufs/dir.h linux-4.15/fs/aufs/dir.h + union au_vdir_deblk_p p; + } vd_last; + -+ unsigned long vd_version; ++ u64 vd_version; + unsigned int vd_deblk_sz; + unsigned long vd_jiffy; +} ____cacheline_aligned_in_smp; @@ -9729,12 +9821,13 @@ diff -Naur null/fs/aufs/dir.h linux-4.15/fs/aufs/dir.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIR_H__ */ -diff -Naur null/fs/aufs/dirren.c linux-4.15/fs/aufs/dirren.c +diff -Naur null/fs/aufs/dirren.c linux-4.17/fs/aufs/dirren.c --- /dev/null -+++ linux-4.15/fs/aufs/dirren.c 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,1315 @@ ++++ linux-4.17/fs/aufs/dirren.c 2018-07-25 15:11:05.127257463 +0200 +@@ -0,0 +1,1316 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2017 Junjiro R. Okajima ++ * Copyright (C) 2017-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -10736,7 +10829,7 @@ diff -Naur null/fs/aufs/dirren.c linux-4.15/fs/aufs/dirren.c + drinfo = NULL; + unlocked = 0; + h_dir = d_inode(h_ppath->dentry); -+ vfsub_inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); ++ inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); + infopath.dentry = vfsub_lookup_one_len(whname, h_ppath->dentry, + whnamelen); + if (IS_ERR(infopath.dentry)) { @@ -11048,12 +11141,13 @@ diff -Naur null/fs/aufs/dirren.c linux-4.15/fs/aufs/dirren.c +out: + return err; +} -diff -Naur null/fs/aufs/dirren.h linux-4.15/fs/aufs/dirren.h +diff -Naur null/fs/aufs/dirren.h linux-4.17/fs/aufs/dirren.h --- /dev/null -+++ linux-4.15/fs/aufs/dirren.h 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,139 @@ ++++ linux-4.17/fs/aufs/dirren.h 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,140 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2017 Junjiro R. Okajima ++ * Copyright (C) 2017-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11191,12 +11285,13 @@ diff -Naur null/fs/aufs/dirren.h linux-4.15/fs/aufs/dirren.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DIRREN_H__ */ -diff -Naur null/fs/aufs/dynop.c linux-4.15/fs/aufs/dynop.c +diff -Naur null/fs/aufs/dynop.c linux-4.17/fs/aufs/dynop.c --- /dev/null -+++ linux-4.15/fs/aufs/dynop.c 2018-02-25 02:38:09.199737576 +0100 -@@ -0,0 +1,369 @@ ++++ linux-4.17/fs/aufs/dynop.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,370 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2017 Junjiro R. Okajima ++ * Copyright (C) 2010-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11564,12 +11659,13 @@ diff -Naur null/fs/aufs/dynop.c linux-4.15/fs/aufs/dynop.c + for (i = 0; i < AuDyLast; i++) + WARN_ON(!hlist_bl_empty(dynop + i)); +} -diff -Naur null/fs/aufs/dynop.h linux-4.15/fs/aufs/dynop.h +diff -Naur null/fs/aufs/dynop.h linux-4.17/fs/aufs/dynop.h --- /dev/null -+++ linux-4.15/fs/aufs/dynop.h 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,74 @@ ++++ linux-4.17/fs/aufs/dynop.h 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,75 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2010-2017 Junjiro R. Okajima ++ * Copyright (C) 2010-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11642,12 +11738,13 @@ diff -Naur null/fs/aufs/dynop.h linux-4.15/fs/aufs/dynop.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_DYNOP_H__ */ -diff -Naur null/fs/aufs/export.c linux-4.15/fs/aufs/export.c +diff -Naur null/fs/aufs/export.c linux-4.17/fs/aufs/export.c --- /dev/null -+++ linux-4.15/fs/aufs/export.c 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,836 @@ ++++ linux-4.17/fs/aufs/export.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,838 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -11829,7 +11926,7 @@ diff -Naur null/fs/aufs/export.c linux-4.15/fs/aufs/export.c + return err; +} + -+int au_xigen_set(struct super_block *sb, struct file *base) ++int au_xigen_set(struct super_block *sb, struct path *path) +{ + int err; + struct au_sbinfo *sbinfo; @@ -11838,7 +11935,7 @@ diff -Naur null/fs/aufs/export.c linux-4.15/fs/aufs/export.c + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ file = au_xino_create2(base, sbinfo->si_xigen); ++ file = au_xino_create2(sb, path, sbinfo->si_xigen); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -11848,6 +11945,7 @@ diff -Naur null/fs/aufs/export.c linux-4.15/fs/aufs/export.c + sbinfo->si_xigen = file; + +out: ++ AuTraceErr(err); + return err; +} + @@ -12482,12 +12580,13 @@ diff -Naur null/fs/aufs/export.c linux-4.15/fs/aufs/export.c + BUILD_BUG_ON(sizeof(u) != sizeof(int)); + atomic_set(&sbinfo->si_xigen_next, u); +} -diff -Naur null/fs/aufs/fhsm.c linux-4.15/fs/aufs/fhsm.c +diff -Naur null/fs/aufs/fhsm.c linux-4.17/fs/aufs/fhsm.c --- /dev/null -+++ linux-4.15/fs/aufs/fhsm.c 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,426 @@ ++++ linux-4.17/fs/aufs/fhsm.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,427 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2011-2017 Junjiro R. Okajima ++ * Copyright (C) 2011-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -12657,10 +12756,9 @@ diff -Naur null/fs/aufs/fhsm.c linux-4.15/fs/aufs/fhsm.c + +/* ---------------------------------------------------------------------- */ + -+static unsigned int au_fhsm_poll(struct file *file, -+ struct poll_table_struct *wait) ++static __poll_t au_fhsm_poll(struct file *file, struct poll_table_struct *wait) +{ -+ unsigned int mask; ++ __poll_t mask; + struct au_sbinfo *sbinfo; + struct au_fhsm *fhsm; + @@ -12669,9 +12767,10 @@ diff -Naur null/fs/aufs/fhsm.c linux-4.15/fs/aufs/fhsm.c + fhsm = &sbinfo->si_fhsm; + poll_wait(file, &fhsm->fhsm_wqh, wait); + if (atomic_read(&fhsm->fhsm_readable)) -+ mask = POLLIN /* | POLLRDNORM */; ++ mask = EPOLLIN /* | EPOLLRDNORM */; + -+ AuTraceErr((int)mask); ++ if (!mask) ++ AuDbg("mask 0x%x\n", mask); + return mask; +} + @@ -12912,12 +13011,13 @@ diff -Naur null/fs/aufs/fhsm.c linux-4.15/fs/aufs/fhsm.c + if (u != AUFS_FHSM_CACHE_DEF_SEC) + seq_printf(seq, ",fhsm_sec=%u", u); +} -diff -Naur null/fs/aufs/file.c linux-4.15/fs/aufs/file.c +diff -Naur null/fs/aufs/file.c linux-4.17/fs/aufs/file.c --- /dev/null -+++ linux-4.15/fs/aufs/file.c 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,856 @@ ++++ linux-4.17/fs/aufs/file.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,857 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -13772,12 +13872,13 @@ diff -Naur null/fs/aufs/file.c linux-4.15/fs/aufs/file.c + .swap_deactivate = aufs_swap_deactivate +#endif /* CONFIG_AUFS_DEBUG */ +}; -diff -Naur null/fs/aufs/file.h linux-4.15/fs/aufs/file.h +diff -Naur null/fs/aufs/file.h linux-4.17/fs/aufs/file.h --- /dev/null -+++ linux-4.15/fs/aufs/file.h 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,340 @@ ++++ linux-4.17/fs/aufs/file.h 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,341 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -13870,7 +13971,7 @@ diff -Naur null/fs/aufs/file.h linux-4.15/fs/aufs/file.h + +/* poll.c */ +#ifdef CONFIG_AUFS_POLL -+unsigned int aufs_poll(struct file *file, poll_table *wait); ++__poll_t aufs_poll(struct file *file, poll_table *wait); +#endif + +#ifdef CONFIG_AUFS_BR_HFSPLUS @@ -14116,12 +14217,13 @@ diff -Naur null/fs/aufs/file.h linux-4.15/fs/aufs/file.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_FILE_H__ */ -diff -Naur null/fs/aufs/finfo.c linux-4.15/fs/aufs/finfo.c +diff -Naur null/fs/aufs/finfo.c linux-4.17/fs/aufs/finfo.c --- /dev/null -+++ linux-4.15/fs/aufs/finfo.c 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,148 @@ ++++ linux-4.17/fs/aufs/finfo.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,149 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -14268,12 +14370,13 @@ diff -Naur null/fs/aufs/finfo.c linux-4.15/fs/aufs/finfo.c +out: + return err; +} -diff -Naur null/fs/aufs/f_op.c linux-4.15/fs/aufs/f_op.c +diff -Naur null/fs/aufs/f_op.c linux-4.17/fs/aufs/f_op.c --- /dev/null -+++ linux-4.15/fs/aufs/f_op.c 2018-02-25 02:38:09.200737684 +0100 -@@ -0,0 +1,817 @@ ++++ linux-4.17/fs/aufs/f_op.c 2018-07-25 15:11:05.128257402 +0200 +@@ -0,0 +1,818 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15089,12 +15192,13 @@ diff -Naur null/fs/aufs/f_op.c linux-4.15/fs/aufs/f_op.c + .fallocate = aufs_fallocate, + .copy_file_range = aufs_copy_file_range +}; -diff -Naur null/fs/aufs/fstype.h linux-4.15/fs/aufs/fstype.h +diff -Naur null/fs/aufs/fstype.h linux-4.17/fs/aufs/fstype.h --- /dev/null -+++ linux-4.15/fs/aufs/fstype.h 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,400 @@ ++++ linux-4.17/fs/aufs/fstype.h 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,401 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15493,12 +15597,13 @@ diff -Naur null/fs/aufs/fstype.h linux-4.15/fs/aufs/fstype.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_FSTYPE_H__ */ -diff -Naur null/fs/aufs/hbl.h linux-4.15/fs/aufs/hbl.h +diff -Naur null/fs/aufs/hbl.h linux-4.17/fs/aufs/hbl.h --- /dev/null -+++ linux-4.15/fs/aufs/hbl.h 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,64 @@ ++++ linux-4.17/fs/aufs/hbl.h 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,65 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2017 Junjiro R. Okajima ++ * Copyright (C) 2017-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15561,12 +15666,13 @@ diff -Naur null/fs/aufs/hbl.h linux-4.15/fs/aufs/hbl.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_HBL_H__ */ -diff -Naur null/fs/aufs/hfsnotify.c linux-4.15/fs/aufs/hfsnotify.c +diff -Naur null/fs/aufs/hfsnotify.c linux-4.17/fs/aufs/hfsnotify.c --- /dev/null -+++ linux-4.15/fs/aufs/hfsnotify.c 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,289 @@ ++++ linux-4.17/fs/aufs/hfsnotify.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,290 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15854,12 +15960,13 @@ diff -Naur null/fs/aufs/hfsnotify.c linux-4.15/fs/aufs/hfsnotify.c + .fin_br = au_hfsn_fin_br, + .init_br = au_hfsn_init_br +}; -diff -Naur null/fs/aufs/hfsplus.c linux-4.15/fs/aufs/hfsplus.c +diff -Naur null/fs/aufs/hfsplus.c linux-4.17/fs/aufs/hfsplus.c --- /dev/null -+++ linux-4.15/fs/aufs/hfsplus.c 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,56 @@ ++++ linux-4.17/fs/aufs/hfsplus.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,57 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2017 Junjiro R. Okajima ++ * Copyright (C) 2010-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -15914,12 +16021,13 @@ diff -Naur null/fs/aufs/hfsplus.c linux-4.15/fs/aufs/hfsplus.c + au_sbr_put(dentry->d_sb, bindex); + } +} -diff -Naur null/fs/aufs/hnotify.c linux-4.15/fs/aufs/hnotify.c +diff -Naur null/fs/aufs/hnotify.c linux-4.17/fs/aufs/hnotify.c --- /dev/null -+++ linux-4.15/fs/aufs/hnotify.c 2018-02-25 02:38:09.201737791 +0100 -@@ -0,0 +1,719 @@ ++++ linux-4.17/fs/aufs/hnotify.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,720 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16242,7 +16350,7 @@ diff -Naur null/fs/aufs/hnotify.c linux-4.15/fs/aufs/hnotify.c + if (au_ftest_hnjob(a->flags, TRYXINO0) + && a->inode + && a->h_inode) { -+ vfsub_inode_lock_shared_nested(a->h_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(a->h_inode, AuLsc_I_CHILD); + if (!a->h_inode->i_nlink + && !(a->h_inode->i_state & I_LINKABLE)) + hn_xino(a->inode, a->h_inode); /* ignore this error */ @@ -16268,7 +16376,7 @@ diff -Naur null/fs/aufs/hnotify.c linux-4.15/fs/aufs/hnotify.c + if (vdir) + vdir->vd_jiffy = 0; + /* IMustLock(a->inode); */ -+ /* a->inode->i_version++; */ ++ /* inode_inc_iversion(a->inode); */ + } + + /* can do nothing but warn */ @@ -16637,12 +16745,13 @@ diff -Naur null/fs/aufs/hnotify.c linux-4.15/fs/aufs/hnotify.c + if (au_cache[AuCache_HNOTIFY]) + au_hn_destroy_cache(); +} -diff -Naur null/fs/aufs/iinfo.c linux-4.15/fs/aufs/iinfo.c +diff -Naur null/fs/aufs/iinfo.c linux-4.17/fs/aufs/iinfo.c --- /dev/null -+++ linux-4.15/fs/aufs/iinfo.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,285 @@ ++++ linux-4.17/fs/aufs/iinfo.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,286 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16926,12 +17035,13 @@ diff -Naur null/fs/aufs/iinfo.c linux-4.15/fs/aufs/iinfo.c + kfree(iinfo->ii_hinode); + AuRwDestroy(&iinfo->ii_rwsem); +} -diff -Naur null/fs/aufs/inode.c linux-4.15/fs/aufs/inode.c +diff -Naur null/fs/aufs/inode.c linux-4.17/fs/aufs/inode.c --- /dev/null -+++ linux-4.15/fs/aufs/inode.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,527 @@ ++++ linux-4.17/fs/aufs/inode.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,528 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -16967,7 +17077,7 @@ diff -Naur null/fs/aufs/inode.c linux-4.15/fs/aufs/inode.c + au_cpup_attr_all(inode, /*force*/0); + au_update_iigen(inode, /*half*/1); + if (do_version) -+ inode->i_version++; ++ inode_inc_iversion(inode); +} + +static int au_ii_refresh(struct inode *inode, int *update) @@ -17457,12 +17567,13 @@ diff -Naur null/fs/aufs/inode.c linux-4.15/fs/aufs/inode.c + mask |= MAY_READ; /* force permission check */ + return au_test_h_perm(h_inode, mask); +} -diff -Naur null/fs/aufs/inode.h linux-4.15/fs/aufs/inode.h +diff -Naur null/fs/aufs/inode.h linux-4.17/fs/aufs/inode.h --- /dev/null -+++ linux-4.15/fs/aufs/inode.h 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,695 @@ ++++ linux-4.17/fs/aufs/inode.h 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,696 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -18143,7 +18254,7 @@ diff -Naur null/fs/aufs/inode.h linux-4.15/fs/aufs/inode.h +static inline void au_hn_inode_lock_shared_nested(struct au_hinode *hdir, + unsigned int sc) +{ -+ vfsub_inode_lock_shared_nested(hdir->hi_inode, sc); ++ inode_lock_shared_nested(hdir->hi_inode, sc); + au_hn_suspend(hdir); +} +#endif @@ -18156,12 +18267,13 @@ diff -Naur null/fs/aufs/inode.h linux-4.15/fs/aufs/inode.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_INODE_H__ */ -diff -Naur null/fs/aufs/ioctl.c linux-4.15/fs/aufs/ioctl.c +diff -Naur null/fs/aufs/ioctl.c linux-4.17/fs/aufs/ioctl.c --- /dev/null -+++ linux-4.15/fs/aufs/ioctl.c 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,219 @@ ++++ linux-4.17/fs/aufs/ioctl.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,220 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -18379,12 +18491,13 @@ diff -Naur null/fs/aufs/ioctl.c linux-4.15/fs/aufs/ioctl.c + return aufs_ioctl_nondir(file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif -diff -Naur null/fs/aufs/i_op_add.c linux-4.15/fs/aufs/i_op_add.c +diff -Naur null/fs/aufs/i_op_add.c linux-4.17/fs/aufs/i_op_add.c --- /dev/null -+++ linux-4.15/fs/aufs/i_op_add.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,920 @@ ++++ linux-4.17/fs/aufs/i_op_add.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,921 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -18443,7 +18556,7 @@ diff -Naur null/fs/aufs/i_op_add.c linux-4.15/fs/aufs/i_op_add.c + dir = d_inode(dentry->d_parent); /* dir inode is locked */ + IMustLock(dir); + au_dir_ts(dir, bindex); -+ dir->i_version++; ++ inode_inc_iversion(dir); + au_fhsm_wrote(sb, bindex, /*force*/0); + return 0; /* success */ + } @@ -19156,7 +19269,7 @@ diff -Naur null/fs/aufs/i_op_add.c linux-4.15/fs/aufs/i_op_add.c + } + + au_dir_ts(dir, a->bdst); -+ dir->i_version++; ++ inode_inc_iversion(dir); + inc_nlink(inode); + inode->i_ctime = dir->i_ctime; + d_instantiate(dentry, au_igrab(inode)); @@ -19303,12 +19416,13 @@ diff -Naur null/fs/aufs/i_op_add.c linux-4.15/fs/aufs/i_op_add.c +out: + return err; +} -diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c +diff -Naur null/fs/aufs/i_op.c linux-4.17/fs/aufs/i_op.c --- /dev/null -+++ linux-4.15/fs/aufs/i_op.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,1459 @@ ++++ linux-4.17/fs/aufs/i_op.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,1460 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -19348,7 +19462,7 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + if (((mask & MAY_EXEC) + && S_ISREG(h_inode->i_mode) + && (path_noexec(h_path) -+ || !(h_inode->i_mode & S_IXUGO)))) ++ || !(h_inode->i_mode & 0111)))) + goto out; + + /* @@ -19363,7 +19477,7 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + && write_mask && !(mask & MAY_READ)) + || !h_inode->i_op->permission) { + /* AuLabel(generic_permission); */ -+ /* AuDbg("get_acl %pf\n", h_inode->i_op->get_acl); */ ++ /* AuDbg("get_acl %ps\n", h_inode->i_op->get_acl); */ + err = generic_permission(h_inode, mask); + if (err == -EOPNOTSUPP && au_test_nfs_noacl(h_inode)) + err = h_inode->i_op->permission(h_inode, mask); @@ -19741,7 +19855,7 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + if (!err && add_entry && !au_ftest_wrdir(add_entry, TMPFILE)) { + h_parent = au_h_dptr(parent, bcpup); + h_dir = d_inode(h_parent); -+ vfsub_inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); ++ inode_lock_shared_nested(h_dir, AuLsc_I_PARENT); + err = au_lkup_neg(dentry, bcpup, /*wh*/0); + /* todo: no unlock here */ + inode_unlock_shared(h_dir); @@ -20128,7 +20242,7 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + a->h_path.dentry = au_h_dptr(dentry, btop); + a->h_inode = d_inode(a->h_path.dentry); + if (ia && (ia->ia_valid & ATTR_SIZE)) { -+ vfsub_inode_lock_shared_nested(a->h_inode, AuLsc_I_CHILD); ++ inode_lock_shared_nested(a->h_inode, AuLsc_I_CHILD); + if (ia->ia_size < i_size_read(a->h_inode)) + sz = ia->ia_size; + inode_unlock_shared(a->h_inode); @@ -20620,7 +20734,7 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + goto out_unlock; + + err = 0; -+ AuDbg("%pf\n", h_inode->i_op->get_link); ++ AuDbg("%ps\n", h_inode->i_op->get_link); + AuDbgDentry(h_dentry); + ret = vfs_get_link(h_dentry, done); + dput(h_dentry); @@ -20766,12 +20880,13 @@ diff -Naur null/fs/aufs/i_op.c linux-4.15/fs/aufs/i_op.c + .update_time = aufs_update_time + } +}; -diff -Naur null/fs/aufs/i_op_del.c linux-4.15/fs/aufs/i_op_del.c +diff -Naur null/fs/aufs/i_op_del.c linux-4.17/fs/aufs/i_op_del.c --- /dev/null -+++ linux-4.15/fs/aufs/i_op_del.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,511 @@ ++++ linux-4.17/fs/aufs/i_op_del.c 2018-07-25 15:11:05.129257341 +0200 +@@ -0,0 +1,512 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -21041,7 +21156,7 @@ diff -Naur null/fs/aufs/i_op_del.c linux-4.15/fs/aufs/i_op_del.c + inode->i_ctime = dir->i_ctime; + + au_dir_ts(dir, bindex); -+ dir->i_version++; ++ inode_inc_iversion(dir); +} + +/* @@ -21281,12 +21396,13 @@ diff -Naur null/fs/aufs/i_op_del.c linux-4.15/fs/aufs/i_op_del.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/i_op_ren.c linux-4.15/fs/aufs/i_op_ren.c +diff -Naur null/fs/aufs/i_op_ren.c linux-4.17/fs/aufs/i_op_ren.c --- /dev/null -+++ linux-4.15/fs/aufs/i_op_ren.c 2018-02-25 02:38:09.202737899 +0100 -@@ -0,0 +1,1246 @@ ++++ linux-4.17/fs/aufs/i_op_ren.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,1247 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22038,7 +22154,7 @@ diff -Naur null/fs/aufs/i_op_ren.c linux-4.15/fs/aufs/i_op_ren.c + struct inode *dir; + + dir = a->dst_dir; -+ dir->i_version++; ++ inode_inc_iversion(dir); + if (au_ftest_ren(a->auren_flags, ISDIR_SRC)) { + /* is this updating defined in POSIX? */ + au_cpup_attr_timesizes(a->src_inode); @@ -22048,7 +22164,7 @@ diff -Naur null/fs/aufs/i_op_ren.c linux-4.15/fs/aufs/i_op_ren.c + + if (a->exchange) { + dir = a->src_dir; -+ dir->i_version++; ++ inode_inc_iversion(dir); + if (au_ftest_ren(a->auren_flags, ISDIR_DST)) { + /* is this updating defined in POSIX? */ + au_cpup_attr_timesizes(a->dst_inode); @@ -22061,7 +22177,7 @@ diff -Naur null/fs/aufs/i_op_ren.c linux-4.15/fs/aufs/i_op_ren.c + return; + + dir = a->src_dir; -+ dir->i_version++; ++ inode_inc_iversion(dir); + if (au_ftest_ren(a->auren_flags, ISDIR_SRC)) + au_cpup_attr_nlink(dir, /*force*/1); + au_dir_ts(dir, a->btgt); @@ -22531,9 +22647,9 @@ diff -Naur null/fs/aufs/i_op_ren.c linux-4.15/fs/aufs/i_op_ren.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/Kconfig linux-4.15/fs/aufs/Kconfig +diff -Naur null/fs/aufs/Kconfig linux-4.17/fs/aufs/Kconfig --- /dev/null -+++ linux-4.15/fs/aufs/Kconfig 2018-02-25 02:38:09.197737361 +0100 ++++ linux-4.17/fs/aufs/Kconfig 2018-07-25 15:11:05.125257586 +0200 @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: GPL-2.0 +config AUFS_FS @@ -22734,12 +22850,13 @@ diff -Naur null/fs/aufs/Kconfig linux-4.15/fs/aufs/Kconfig + Automatic configuration for internal use. + When aufs supports Magic SysRq, enabled automatically. +endif -diff -Naur null/fs/aufs/loop.c linux-4.15/fs/aufs/loop.c +diff -Naur null/fs/aufs/loop.c linux-4.17/fs/aufs/loop.c --- /dev/null -+++ linux-4.15/fs/aufs/loop.c 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,147 @@ ++++ linux-4.17/fs/aufs/loop.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,148 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22885,12 +23002,13 @@ diff -Naur null/fs/aufs/loop.c linux-4.15/fs/aufs/loop.c + symbol_put(loop_backing_file); + kfree(au_warn_loopback_array); +} -diff -Naur null/fs/aufs/loop.h linux-4.15/fs/aufs/loop.h +diff -Naur null/fs/aufs/loop.h linux-4.17/fs/aufs/loop.h --- /dev/null -+++ linux-4.15/fs/aufs/loop.h 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,52 @@ ++++ linux-4.17/fs/aufs/loop.h 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,53 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -22941,9 +23059,9 @@ diff -Naur null/fs/aufs/loop.h linux-4.15/fs/aufs/loop.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_LOOP_H__ */ -diff -Naur null/fs/aufs/magic.mk linux-4.15/fs/aufs/magic.mk +diff -Naur null/fs/aufs/magic.mk linux-4.17/fs/aufs/magic.mk --- /dev/null -+++ linux-4.15/fs/aufs/magic.mk 2018-02-25 02:38:09.203738006 +0100 ++++ linux-4.17/fs/aufs/magic.mk 2018-07-25 15:11:05.130257280 +0200 @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -22976,9 +23094,9 @@ diff -Naur null/fs/aufs/magic.mk linux-4.15/fs/aufs/magic.mk +ifdef CONFIG_HFSPLUS_FS +ccflags-y += -DHFSPLUS_SUPER_MAGIC=0x482b +endif -diff -Naur null/fs/aufs/Makefile linux-4.15/fs/aufs/Makefile +diff -Naur null/fs/aufs/Makefile linux-4.17/fs/aufs/Makefile --- /dev/null -+++ linux-4.15/fs/aufs/Makefile 2018-02-25 02:38:09.197737361 +0100 ++++ linux-4.17/fs/aufs/Makefile 2018-07-25 15:11:05.125257586 +0200 @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 + @@ -23026,12 +23144,13 @@ diff -Naur null/fs/aufs/Makefile linux-4.15/fs/aufs/Makefile +aufs-$(CONFIG_AUFS_BR_HFSPLUS) += hfsplus.o +aufs-$(CONFIG_AUFS_DEBUG) += debug.o +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o -diff -Naur null/fs/aufs/module.c linux-4.15/fs/aufs/module.c +diff -Naur null/fs/aufs/module.c linux-4.17/fs/aufs/module.c --- /dev/null -+++ linux-4.15/fs/aufs/module.c 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,266 @@ ++++ linux-4.17/fs/aufs/module.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,273 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -23181,12 +23300,12 @@ diff -Naur null/fs/aufs/module.c linux-4.15/fs/aufs/module.c +/* this module parameter has no meaning when SYSFS is disabled */ +int sysaufs_brs = 1; +MODULE_PARM_DESC(brs, "use /fs/aufs/si_*/brN"); -+module_param_named(brs, sysaufs_brs, int, S_IRUGO); ++module_param_named(brs, sysaufs_brs, int, 0444); + +/* this module parameter has no meaning when USER_NS is disabled */ +bool au_userns; +MODULE_PARM_DESC(allow_userns, "allow unprivileged to mount under userns"); -+module_param_named(allow_userns, au_userns, bool, S_IRUGO); ++module_param_named(allow_userns, au_userns, bool, 0444); + +/* ---------------------------------------------------------------------- */ + @@ -23234,9 +23353,12 @@ diff -Naur null/fs/aufs/module.c linux-4.15/fs/aufs/module.c + err = sysaufs_init(); + if (unlikely(err)) + goto out; -+ err = au_procfs_init(); ++ err = dbgaufs_init(); + if (unlikely(err)) + goto out_sysaufs; ++ err = au_procfs_init(); ++ if (unlikely(err)) ++ goto out_dbgaufs; + err = au_wkq_init(); + if (unlikely(err)) + goto out_procfs; @@ -23274,6 +23396,8 @@ diff -Naur null/fs/aufs/module.c linux-4.15/fs/aufs/module.c + au_wkq_fin(); +out_procfs: + au_procfs_fin(); ++out_dbgaufs: ++ dbgaufs_fin(); +out_sysaufs: + sysaufs_fin(); + au_dy_fin(); @@ -23290,18 +23414,20 @@ diff -Naur null/fs/aufs/module.c linux-4.15/fs/aufs/module.c + au_loopback_fin(); + au_wkq_fin(); + au_procfs_fin(); ++ dbgaufs_fin(); + sysaufs_fin(); + au_dy_fin(); +} + +module_init(aufs_init); +module_exit(aufs_exit); -diff -Naur null/fs/aufs/module.h linux-4.15/fs/aufs/module.h +diff -Naur null/fs/aufs/module.h linux-4.17/fs/aufs/module.h --- /dev/null -+++ linux-4.15/fs/aufs/module.h 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,101 @@ ++++ linux-4.17/fs/aufs/module.h 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,102 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -23401,12 +23527,13 @@ diff -Naur null/fs/aufs/module.h linux-4.15/fs/aufs/module.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_MODULE_H__ */ -diff -Naur null/fs/aufs/mvdown.c linux-4.15/fs/aufs/mvdown.c +diff -Naur null/fs/aufs/mvdown.c linux-4.17/fs/aufs/mvdown.c --- /dev/null -+++ linux-4.15/fs/aufs/mvdown.c 2018-02-25 02:38:09.203738006 +0100 -@@ -0,0 +1,704 @@ ++++ linux-4.17/fs/aufs/mvdown.c 2018-07-25 15:11:05.130257280 +0200 +@@ -0,0 +1,705 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2011-2017 Junjiro R. Okajima ++ * Copyright (C) 2011-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -24109,12 +24236,13 @@ diff -Naur null/fs/aufs/mvdown.c linux-4.15/fs/aufs/mvdown.c + AuTraceErr(err); + return err; +} -diff -Naur null/fs/aufs/opts.c linux-4.15/fs/aufs/opts.c +diff -Naur null/fs/aufs/opts.c linux-4.17/fs/aufs/opts.c --- /dev/null -+++ linux-4.15/fs/aufs/opts.c 2018-02-25 02:38:09.204738113 +0100 ++++ linux-4.17/fs/aufs/opts.c 2018-07-25 15:11:05.131257218 +0200 @@ -0,0 +1,1891 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -25673,14 +25801,7 @@ diff -Naur null/fs/aufs/opts.c linux-4.15/fs/aufs/opts.c + err = 0; + switch (opt->type) { + case Opt_xino: -+ err = au_xino_set(sb, &opt->xino, -+ !!au_ftest_opts(opts->flags, REMOUNT)); -+ if (unlikely(err)) -+ break; -+ -+ *opt_xino = &opt->xino; + au_xino_brid_set(sb, -1); -+ + /* safe d_parent access */ + parent = opt->xino.file->f_path.dentry->d_parent; + root = sb->s_root; @@ -25692,11 +25813,17 @@ diff -Naur null/fs/aufs/opts.c linux-4.15/fs/aufs/opts.c + break; + } + } ++ ++ err = au_xino_set(sb, &opt->xino, ++ !!au_ftest_opts(opts->flags, REMOUNT)); ++ if (unlikely(err)) ++ break; ++ ++ *opt_xino = &opt->xino; + break; + + case Opt_noxino: + au_xino_clr(sb); -+ au_xino_brid_set(sb, -1); + *opt_xino = (void *)-1; + break; + } @@ -26004,12 +26131,13 @@ diff -Naur null/fs/aufs/opts.c linux-4.15/fs/aufs/opts.c +{ + return au_mntflags(sb) & AuOptMask_UDBA; +} -diff -Naur null/fs/aufs/opts.h linux-4.15/fs/aufs/opts.h +diff -Naur null/fs/aufs/opts.h linux-4.17/fs/aufs/opts.h --- /dev/null -+++ linux-4.15/fs/aufs/opts.h 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,224 @@ ++++ linux-4.17/fs/aufs/opts.h 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,225 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26232,12 +26360,13 @@ diff -Naur null/fs/aufs/opts.h linux-4.15/fs/aufs/opts.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_OPTS_H__ */ -diff -Naur null/fs/aufs/plink.c linux-4.15/fs/aufs/plink.c +diff -Naur null/fs/aufs/plink.c linux-4.17/fs/aufs/plink.c --- /dev/null -+++ linux-4.15/fs/aufs/plink.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,515 @@ ++++ linux-4.17/fs/aufs/plink.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,516 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26455,7 +26584,7 @@ diff -Naur null/fs/aufs/plink.c linux-4.15/fs/aufs/plink.c + struct inode *h_inode; + + h_inode = d_inode(h_parent); -+ vfsub_inode_lock_shared_nested(h_inode, AuLsc_I_CHILD2); ++ inode_lock_shared_nested(h_inode, AuLsc_I_CHILD2); + h_dentry = vfsub_lkup_one(tgtname, h_parent); + inode_unlock_shared(h_inode); + return h_dentry; @@ -26751,12 +26880,13 @@ diff -Naur null/fs/aufs/plink.c linux-4.15/fs/aufs/plink.c + } + } +} -diff -Naur null/fs/aufs/poll.c linux-4.15/fs/aufs/poll.c +diff -Naur null/fs/aufs/poll.c linux-4.17/fs/aufs/poll.c --- /dev/null -+++ linux-4.15/fs/aufs/poll.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,52 @@ ++++ linux-4.17/fs/aufs/poll.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,54 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26779,22 +26909,22 @@ diff -Naur null/fs/aufs/poll.c linux-4.15/fs/aufs/poll.c + +#include "aufs.h" + -+unsigned int aufs_poll(struct file *file, poll_table *wait) ++__poll_t aufs_poll(struct file *file, poll_table *wait) +{ -+ unsigned int mask; -+ int err; ++ __poll_t mask; + struct file *h_file; + struct super_block *sb; + + /* We should pretend an error happened. */ -+ mask = POLLERR /* | POLLIN | POLLOUT */; ++ mask = EPOLLERR /* | EPOLLIN | EPOLLOUT */; + sb = file->f_path.dentry->d_sb; + si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLMW); + + h_file = au_read_pre(file, /*keep_fi*/0, /*lsc*/0); -+ err = PTR_ERR(h_file); -+ if (IS_ERR(h_file)) ++ if (IS_ERR(h_file)) { ++ AuDbg("h_file %ld\n", PTR_ERR(h_file)); + goto out; ++ } + + /* it is not an error if h_file has no operation */ + mask = DEFAULT_POLLMASK; @@ -26804,15 +26934,17 @@ diff -Naur null/fs/aufs/poll.c linux-4.15/fs/aufs/poll.c + +out: + si_read_unlock(sb); -+ AuTraceErr((int)mask); ++ if (mask & EPOLLERR) ++ AuDbg("mask 0x%x\n", mask); + return mask; +} -diff -Naur null/fs/aufs/posix_acl.c linux-4.15/fs/aufs/posix_acl.c +diff -Naur null/fs/aufs/posix_acl.c linux-4.17/fs/aufs/posix_acl.c --- /dev/null -+++ linux-4.15/fs/aufs/posix_acl.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,102 @@ ++++ linux-4.17/fs/aufs/posix_acl.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,103 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2014-2017 Junjiro R. Okajima ++ * Copyright (C) 2014-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -26913,12 +27045,13 @@ diff -Naur null/fs/aufs/posix_acl.c linux-4.15/fs/aufs/posix_acl.c +out: + return err; +} -diff -Naur null/fs/aufs/procfs.c linux-4.15/fs/aufs/procfs.c +diff -Naur null/fs/aufs/procfs.c linux-4.17/fs/aufs/procfs.c --- /dev/null -+++ linux-4.15/fs/aufs/procfs.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,170 @@ ++++ linux-4.17/fs/aufs/procfs.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,171 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2010-2017 Junjiro R. Okajima ++ * Copyright (C) 2010-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27073,7 +27206,7 @@ diff -Naur null/fs/aufs/procfs.c linux-4.15/fs/aufs/procfs.c + if (unlikely(!au_procfs_dir)) + goto out; + -+ entry = proc_create(AUFS_PLINK_MAINT_NAME, S_IFREG | S_IWUSR, ++ entry = proc_create(AUFS_PLINK_MAINT_NAME, S_IFREG | 0200, + au_procfs_dir, &au_procfs_plm_fop); + if (unlikely(!entry)) + goto out_dir; @@ -27087,12 +27220,13 @@ diff -Naur null/fs/aufs/procfs.c linux-4.15/fs/aufs/procfs.c +out: + return err; +} -diff -Naur null/fs/aufs/rdu.c linux-4.15/fs/aufs/rdu.c +diff -Naur null/fs/aufs/rdu.c linux-4.17/fs/aufs/rdu.c --- /dev/null -+++ linux-4.15/fs/aufs/rdu.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,381 @@ ++++ linux-4.17/fs/aufs/rdu.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,382 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27472,12 +27606,13 @@ diff -Naur null/fs/aufs/rdu.c linux-4.15/fs/aufs/rdu.c + return err; +} +#endif -diff -Naur null/fs/aufs/rwsem.h linux-4.15/fs/aufs/rwsem.h +diff -Naur null/fs/aufs/rwsem.h linux-4.17/fs/aufs/rwsem.h --- /dev/null -+++ linux-4.15/fs/aufs/rwsem.h 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,72 @@ ++++ linux-4.17/fs/aufs/rwsem.h 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,73 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27548,12 +27683,13 @@ diff -Naur null/fs/aufs/rwsem.h linux-4.15/fs/aufs/rwsem.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_RWSEM_H__ */ -diff -Naur null/fs/aufs/sbinfo.c linux-4.15/fs/aufs/sbinfo.c +diff -Naur null/fs/aufs/sbinfo.c linux-4.17/fs/aufs/sbinfo.c --- /dev/null -+++ linux-4.15/fs/aufs/sbinfo.c 2018-02-25 02:38:09.204738113 +0100 -@@ -0,0 +1,304 @@ ++++ linux-4.17/fs/aufs/sbinfo.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,312 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27594,6 +27730,7 @@ diff -Naur null/fs/aufs/sbinfo.c linux-4.15/fs/aufs/sbinfo.c + AuDebugOn(percpu_counter_sum(&sbinfo->si_nfiles)); + percpu_counter_destroy(&sbinfo->si_nfiles); + ++ dbgaufs_si_fin(sbinfo); + au_rw_write_lock(&sbinfo->si_rwsem); + au_br_free(sbinfo); + au_rw_write_unlock(&sbinfo->si_rwsem); @@ -27621,6 +27758,12 @@ diff -Naur null/fs/aufs/sbinfo.c linux-4.15/fs/aufs/sbinfo.c + goto out_sbinfo; + + err = sysaufs_si_init(sbinfo); ++ if (!err) { ++ dbgaufs_si_null(sbinfo); ++ err = dbgaufs_si_init(sbinfo); ++ if (unlikely(err)) ++ kobject_put(&sbinfo->si_kobj); ++ } + if (unlikely(err)) + goto out_br; + @@ -27714,7 +27857,7 @@ diff -Naur null/fs/aufs/sbinfo.c linux-4.15/fs/aufs/sbinfo.c + au_update_digen(sb->s_root); + inode = d_inode(sb->s_root); + au_update_iigen(inode, /*half*/0); -+ inode->i_version++; ++ inode_inc_iversion(inode); + return gen; +} + @@ -27856,12 +27999,13 @@ diff -Naur null/fs/aufs/sbinfo.c linux-4.15/fs/aufs/sbinfo.c + di_write_unlock2(d1, d2); + si_read_unlock(d1->d_sb); +} -diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c +diff -Naur null/fs/aufs/super.c linux-4.17/fs/aufs/super.c --- /dev/null -+++ linux-4.15/fs/aufs/super.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,1046 @@ ++++ linux-4.17/fs/aufs/super.c 2018-07-25 15:11:05.131257218 +0200 +@@ -0,0 +1,1043 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -27897,7 +28041,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + c = au_cache_alloc_icntnr(); + if (c) { + au_icntnr_init(c); -+ c->vfs_inode.i_version = 1; /* sigen(sb); */ ++ inode_set_iversion(&c->vfs_inode, 1); /* sigen(sb); */ + c->iinfo.ii_hinode = NULL; + return &c->vfs_inode; + } @@ -27935,7 +28079,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + if (!err) + err = au_iinfo_init(inode); + if (!err) -+ inode->i_version++; ++ inode_inc_iversion(inode); + else { + iget_failed(inode); + inode = ERR_PTR(err); @@ -28107,6 +28251,10 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + sb = dentry->d_sb; + if (sb->s_flags & SB_POSIXACL) + seq_puts(m, ",acl"); ++#if 0 ++ if (sb->s_flags & SB_I_VERSION) ++ seq_puts(m, ",i_version"); ++#endif + + /* lock free root dinfo */ + si_noflush_read_lock(sb); @@ -28328,11 +28476,8 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + struct au_sbinfo *sbinfo; + + sbinfo = au_sbi(sb); -+ if (!sbinfo) -+ return; -+ -+ dbgaufs_si_fin(sbinfo); -+ kobject_put(&sbinfo->si_kobj); ++ if (sbinfo) ++ kobject_put(&sbinfo->si_kobj); +} + +/* ---------------------------------------------------------------------- */ @@ -28601,7 +28746,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + AuDebugOn(sbi->si_iop_array == aufs_iop); + sbi->si_iop_array = aufs_iop; + } -+ pr_info("reset to %pf and %pf\n", ++ pr_info("reset to %ps and %ps\n", + sb->s_d_op, sbi->si_iop_array); + } + @@ -28786,6 +28931,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + + /* all timestamps always follow the ones on the branch */ + sb->s_flags |= SB_NOATIME | SB_NODIRATIME; ++ sb->s_flags |= SB_I_VERSION; /* do we really need this? */ + sb->s_op = &aufs_sop; + sb->s_d_op = &aufs_dop; + sb->s_magic = AUFS_SUPER_MAGIC; @@ -28820,7 +28966,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + au_opts_free(&opts); + if (!err && au_ftest_si(sbinfo, NO_DREVAL)) { + sb->s_d_op = &aufs_dop_noreval; -+ pr_info("%pf\n", sb->s_d_op); ++ pr_info("%ps\n", sb->s_d_op); + au_refresh_dop(root, /*force_reval*/0); + sbinfo->si_iop_array = aufs_iop_nogetattr; + au_refresh_iop(inode, /*force_getattr*/0); @@ -28834,7 +28980,6 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + dput(root); + sb->s_root = NULL; +out_info: -+ dbgaufs_si_fin(sbinfo); + kobject_put(&sbinfo->si_kobj); + sb->s_fs_info = NULL; +out_opts: @@ -28853,7 +28998,6 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + void *raw_data) +{ + struct dentry *root; -+ struct super_block *sb; + + /* all timestamps always follow the ones on the branch */ + /* mnt->mnt_flags |= MNT_NOATIME | MNT_NODIRATIME; */ @@ -28861,11 +29005,7 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + if (IS_ERR(root)) + goto out; + -+ sb = root->d_sb; -+ si_write_lock(sb, !AuLock_FLUSH); -+ sysaufs_brs_add(sb, 0); -+ si_write_unlock(sb); -+ au_sbilist_add(sb); ++ au_sbilist_add(root->d_sb); + +out: + return root; @@ -28906,12 +29046,13 @@ diff -Naur null/fs/aufs/super.c linux-4.15/fs/aufs/super.c + /* no need to __module_get() and module_put(). */ + .owner = THIS_MODULE, +}; -diff -Naur null/fs/aufs/super.h linux-4.15/fs/aufs/super.h +diff -Naur null/fs/aufs/super.h linux-4.17/fs/aufs/super.h --- /dev/null -+++ linux-4.15/fs/aufs/super.h 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,626 @@ ++++ linux-4.17/fs/aufs/super.h 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,627 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -29116,7 +29257,7 @@ diff -Naur null/fs/aufs/super.h linux-4.15/fs/aufs/super.h +/* + * set true when refresh_dirs() failed at remount time. + * then try refreshing dirs at access time again. -+ * if it is false, refreshing dirs at access time is unnecesary ++ * if it is false, refreshing dirs at access time is unnecessary + */ +#define AuSi_FAILED_REFRESH_DIR 1 +#define AuSi_FHSM (1 << 1) /* fhsm is active now */ @@ -29257,7 +29398,7 @@ diff -Naur null/fs/aufs/super.h linux-4.15/fs/aufs/super.h +void au_export_init(struct super_block *sb); +void au_xigen_inc(struct inode *inode); +int au_xigen_new(struct inode *inode); -+int au_xigen_set(struct super_block *sb, struct file *base); ++int au_xigen_set(struct super_block *sb, struct path *path); +void au_xigen_clr(struct super_block *sb); + +static inline int au_busy_or_stale(void) @@ -29271,7 +29412,7 @@ diff -Naur null/fs/aufs/super.h linux-4.15/fs/aufs/super.h +AuStubVoid(au_export_init, struct super_block *sb) +AuStubVoid(au_xigen_inc, struct inode *inode) +AuStubInt0(au_xigen_new, struct inode *inode) -+AuStubInt0(au_xigen_set, struct super_block *sb, struct file *base) ++AuStubInt0(au_xigen_set, struct super_block *sb, struct path *path) +AuStubVoid(au_xigen_clr, struct super_block *sb) +AuStub(int, au_busy_or_stale, return -EBUSY, void) +#endif /* CONFIG_AUFS_EXPORT */ @@ -29536,12 +29677,13 @@ diff -Naur null/fs/aufs/super.h linux-4.15/fs/aufs/super.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ -diff -Naur null/fs/aufs/sysaufs.c linux-4.15/fs/aufs/sysaufs.c +diff -Naur null/fs/aufs/sysaufs.c linux-4.17/fs/aufs/sysaufs.c --- /dev/null -+++ linux-4.15/fs/aufs/sysaufs.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,104 @@ ++++ linux-4.17/fs/aufs/sysaufs.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,93 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -29601,18 +29743,11 @@ diff -Naur null/fs/aufs/sysaufs.c linux-4.15/fs/aufs/sysaufs.c + (&sbinfo->si_kobj, &au_sbi_ktype, /*&sysaufs_kset->kobj*/NULL, + SysaufsSiNamePrefix "%lx", sysaufs_si_id(sbinfo)); + -+ dbgaufs_si_null(sbinfo); -+ if (!err) { -+ err = dbgaufs_si_init(sbinfo); -+ if (unlikely(err)) -+ kobject_put(&sbinfo->si_kobj); -+ } + return err; +} + +void sysaufs_fin(void) +{ -+ dbgaufs_fin(); + sysfs_remove_group(&sysaufs_kset->kobj, sysaufs_attr_group); + kset_unregister(sysaufs_kset); +} @@ -29633,23 +29768,19 @@ diff -Naur null/fs/aufs/sysaufs.c linux-4.15/fs/aufs/sysaufs.c + if (IS_ERR(sysaufs_kset)) + goto out; + err = sysfs_create_group(&sysaufs_kset->kobj, sysaufs_attr_group); -+ if (unlikely(err)) { -+ kset_unregister(sysaufs_kset); -+ goto out; -+ } -+ -+ err = dbgaufs_init(); + if (unlikely(err)) -+ sysaufs_fin(); ++ kset_unregister(sysaufs_kset); ++ +out: + return err; +} -diff -Naur null/fs/aufs/sysaufs.h linux-4.15/fs/aufs/sysaufs.h +diff -Naur null/fs/aufs/sysaufs.h linux-4.17/fs/aufs/sysaufs.h --- /dev/null -+++ linux-4.15/fs/aufs/sysaufs.h 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,101 @@ ++++ linux-4.17/fs/aufs/sysaufs.h 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,102 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -29749,12 +29880,13 @@ diff -Naur null/fs/aufs/sysaufs.h linux-4.15/fs/aufs/sysaufs.h + +#endif /* __KERNEL__ */ +#endif /* __SYSAUFS_H__ */ -diff -Naur null/fs/aufs/sysfs.c linux-4.15/fs/aufs/sysfs.c +diff -Naur null/fs/aufs/sysfs.c linux-4.17/fs/aufs/sysfs.c --- /dev/null -+++ linux-4.15/fs/aufs/sysfs.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,376 @@ ++++ linux-4.17/fs/aufs/sysfs.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,373 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -30068,7 +30200,7 @@ diff -Naur null/fs/aufs/sysfs.c linux-4.15/fs/aufs/sysfs.c + attr = &br_sysfs->attr; + sysfs_attr_init(attr); + attr->name = br_sysfs->name; -+ attr->mode = S_IRUGO; ++ attr->mode = 0444; + br_sysfs++; + } +} @@ -30081,8 +30213,6 @@ diff -Naur null/fs/aufs/sysfs.c linux-4.15/fs/aufs/sysfs.c + int i; + aufs_bindex_t bbot; + -+ dbgaufs_brs_del(sb, bindex); -+ + if (!sysaufs_brs) + return; + @@ -30106,8 +30236,6 @@ diff -Naur null/fs/aufs/sysfs.c linux-4.15/fs/aufs/sysfs.c + struct au_branch *br; + struct au_brsysfs *br_sysfs; + -+ dbgaufs_brs_add(sb, bindex); -+ + if (!sysaufs_brs) + return; + @@ -30129,12 +30257,13 @@ diff -Naur null/fs/aufs/sysfs.c linux-4.15/fs/aufs/sysfs.c + } + } +} -diff -Naur null/fs/aufs/sysrq.c linux-4.15/fs/aufs/sysrq.c +diff -Naur null/fs/aufs/sysrq.c linux-4.17/fs/aufs/sysrq.c --- /dev/null -+++ linux-4.15/fs/aufs/sysrq.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,159 @@ ++++ linux-4.17/fs/aufs/sysrq.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,160 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -30245,7 +30374,7 @@ diff -Naur null/fs/aufs/sysrq.c linux-4.15/fs/aufs/sysrq.c + +/* module parameter */ +static char *aufs_sysrq_key = "a"; -+module_param_named(sysrq, aufs_sysrq_key, charp, S_IRUGO); ++module_param_named(sysrq, aufs_sysrq_key, charp, 0444); +MODULE_PARM_DESC(sysrq, "MagicSysRq key for " AUFS_NAME); + +static void au_sysrq(int key __maybe_unused) @@ -30292,12 +30421,13 @@ diff -Naur null/fs/aufs/sysrq.c linux-4.15/fs/aufs/sysrq.c + if (unlikely(err)) + pr_err("err %d (ignored)\n", err); +} -diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c +diff -Naur null/fs/aufs/vdir.c linux-4.17/fs/aufs/vdir.c --- /dev/null -+++ linux-4.15/fs/aufs/vdir.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,892 @@ ++++ linux-4.17/fs/aufs/vdir.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,894 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -30953,7 +31083,7 @@ diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c + err = 0; + allocated = vdir; + } else if (may_read -+ && (inode->i_version != vdir->vd_version ++ && (!inode_eq_iversion(inode, vdir->vd_version) + || time_after(jiffies, vdir->vd_jiffy + expire))) { + do_read = 1; + err = reinit_vdir(vdir); @@ -30969,7 +31099,7 @@ diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c + err = au_do_read_vdir(&arg); + if (!err) { + /* file->f_pos = 0; */ /* todo: ctx->pos? */ -+ vdir->vd_version = inode->i_version; ++ vdir->vd_version = inode_query_iversion(inode); + vdir->vd_last.ul = 0; + vdir->vd_last.p.deblk = vdir->vd_deblk[0]; + if (allocated) @@ -31066,7 +31196,7 @@ diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c + inode = file_inode(file); + err = copy_vdir(vdir_cache, au_ivdir(inode)); + if (!err) { -+ file->f_version = inode->i_version; ++ file->f_version = inode_query_iversion(inode); + if (allocated) + au_set_fvdir_cache(file, allocated); + } else if (allocated) @@ -31139,7 +31269,8 @@ diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c + +out: + /* smp_mb(); */ -+ AuTraceErr(!valid); ++ if (!valid) ++ AuDbg("valid %d\n", !valid); + return valid; +} + @@ -31188,12 +31319,13 @@ diff -Naur null/fs/aufs/vdir.c linux-4.15/fs/aufs/vdir.c + /* smp_mb(); */ + return 0; +} -diff -Naur null/fs/aufs/vfsub.c linux-4.15/fs/aufs/vfsub.c +diff -Naur null/fs/aufs/vfsub.c linux-4.17/fs/aufs/vfsub.c --- /dev/null -+++ linux-4.15/fs/aufs/vfsub.c 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,894 @@ ++++ linux-4.17/fs/aufs/vfsub.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,895 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -31779,7 +31911,7 @@ diff -Naur null/fs/aufs/vfsub.c linux-4.15/fs/aufs/vfsub.c +{ + int err; + -+ AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos); ++ AuDbg("%pD, ctx{%ps, %llu}\n", file, ctx->actor, ctx->pos); + + lockdep_off(); + err = iterate_dir(file, ctx); @@ -32086,12 +32218,13 @@ diff -Naur null/fs/aufs/vfsub.c linux-4.15/fs/aufs/vfsub.c + + return err; +} -diff -Naur null/fs/aufs/vfsub.h linux-4.15/fs/aufs/vfsub.h +diff -Naur null/fs/aufs/vfsub.h linux-4.17/fs/aufs/vfsub.h --- /dev/null -+++ linux-4.15/fs/aufs/vfsub.h 2018-02-25 02:38:09.205738221 +0100 -@@ -0,0 +1,360 @@ ++++ linux-4.17/fs/aufs/vfsub.h 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,355 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -32117,6 +32250,7 @@ diff -Naur null/fs/aufs/vfsub.h linux-4.15/fs/aufs/vfsub.h +#ifdef __KERNEL__ + +#include ++#include +#include +#include +#include @@ -32146,13 +32280,6 @@ diff -Naur null/fs/aufs/vfsub.h linux-4.15/fs/aufs/vfsub.h +#define MtxMustLock(mtx) AuDebugOn(!mutex_is_locked(mtx)) +#define IMustLock(i) AuDebugOn(!inode_is_locked(i)) + -+/* why VFS doesn't define it? */ -+static inline -+void vfsub_inode_lock_shared_nested(struct inode *inode, unsigned int sc) -+{ -+ down_read_nested(&inode->i_rwsem, sc); -+} -+ +/* ---------------------------------------------------------------------- */ + +static inline void vfsub_drop_nlink(struct inode *inode) @@ -32450,12 +32577,13 @@ diff -Naur null/fs/aufs/vfsub.h linux-4.15/fs/aufs/vfsub.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_VFSUB_H__ */ -diff -Naur null/fs/aufs/wbr_policy.c linux-4.15/fs/aufs/wbr_policy.c +diff -Naur null/fs/aufs/wbr_policy.c linux-4.17/fs/aufs/wbr_policy.c --- /dev/null -+++ linux-4.15/fs/aufs/wbr_policy.c 2018-02-25 02:38:09.206738328 +0100 ++++ linux-4.17/fs/aufs/wbr_policy.c 2018-07-25 15:11:05.132257157 +0200 @@ -0,0 +1,830 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -32582,8 +32710,7 @@ diff -Naur null/fs/aufs/wbr_policy.c linux-4.15/fs/aufs/wbr_policy.c + goto out; + h_path.dentry = au_h_dptr(dentry, bdst); + h_path.mnt = au_sbr_mnt(dentry->d_sb, bdst); -+ err = vfsub_sio_mkdir(au_h_iptr(dir, bdst), &h_path, -+ S_IRWXU | S_IRUGO | S_IXUGO); ++ err = vfsub_sio_mkdir(au_h_iptr(dir, bdst), &h_path, 0755); + if (unlikely(err)) + goto out_put; + au_fset_cpdown(*flags, MADE_DIR); @@ -33284,12 +33411,13 @@ diff -Naur null/fs/aufs/wbr_policy.c linux-4.15/fs/aufs/wbr_policy.c + .fin = au_wbr_create_fin_mfs + } +}; -diff -Naur null/fs/aufs/whout.c linux-4.15/fs/aufs/whout.c +diff -Naur null/fs/aufs/whout.c linux-4.17/fs/aufs/whout.c --- /dev/null -+++ linux-4.15/fs/aufs/whout.c 2018-02-25 02:38:09.206738328 +0100 -@@ -0,0 +1,1061 @@ ++++ linux-4.17/fs/aufs/whout.c 2018-07-25 15:11:05.132257157 +0200 +@@ -0,0 +1,1062 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -33311,7 +33439,7 @@ diff -Naur null/fs/aufs/whout.c linux-4.15/fs/aufs/whout.c + +#include "aufs.h" + -+#define WH_MASK S_IRUGO ++#define WH_MASK 0444 + +/* + * If a directory contains this file, then it is opaque. We start with the @@ -33604,10 +33732,10 @@ diff -Naur null/fs/aufs/whout.c linux-4.15/fs/aufs/whout.c + + err = -EEXIST; + if (d_is_negative(path->dentry)) { -+ int mode = S_IRWXU; ++ int mode = 0700; + + if (au_test_nfs(path->dentry->d_sb)) -+ mode |= S_IXUGO; ++ mode |= 0111; + err = vfsub_mkdir(h_dir, path, mode); + } else if (d_is_dir(path->dentry)) + err = 0; @@ -34349,12 +34477,13 @@ diff -Naur null/fs/aufs/whout.c linux-4.15/fs/aufs/whout.c + au_whtmp_rmdir_free(args); + } +} -diff -Naur null/fs/aufs/whout.h linux-4.15/fs/aufs/whout.h +diff -Naur null/fs/aufs/whout.h linux-4.17/fs/aufs/whout.h --- /dev/null -+++ linux-4.15/fs/aufs/whout.h 2018-02-25 02:38:09.206738328 +0100 -@@ -0,0 +1,85 @@ ++++ linux-4.17/fs/aufs/whout.h 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,86 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -34438,12 +34567,13 @@ diff -Naur null/fs/aufs/whout.h linux-4.15/fs/aufs/whout.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WHOUT_H__ */ -diff -Naur null/fs/aufs/wkq.c linux-4.15/fs/aufs/wkq.c +diff -Naur null/fs/aufs/wkq.c linux-4.17/fs/aufs/wkq.c --- /dev/null -+++ linux-4.15/fs/aufs/wkq.c 2018-02-25 02:38:09.206738328 +0100 -@@ -0,0 +1,390 @@ ++++ linux-4.17/fs/aufs/wkq.c 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,391 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -34832,12 +34962,13 @@ diff -Naur null/fs/aufs/wkq.c linux-4.15/fs/aufs/wkq.c + + return err; +} -diff -Naur null/fs/aufs/wkq.h linux-4.15/fs/aufs/wkq.h +diff -Naur null/fs/aufs/wkq.h linux-4.17/fs/aufs/wkq.h --- /dev/null -+++ linux-4.15/fs/aufs/wkq.h 2018-02-25 02:38:09.206738328 +0100 -@@ -0,0 +1,93 @@ ++++ linux-4.17/fs/aufs/wkq.h 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,94 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -34929,12 +35060,13 @@ diff -Naur null/fs/aufs/wkq.h linux-4.15/fs/aufs/wkq.h + +#endif /* __KERNEL__ */ +#endif /* __AUFS_WKQ_H__ */ -diff -Naur null/fs/aufs/xattr.c linux-4.15/fs/aufs/xattr.c +diff -Naur null/fs/aufs/xattr.c linux-4.17/fs/aufs/xattr.c --- /dev/null -+++ linux-4.15/fs/aufs/xattr.c 2018-02-25 02:38:09.206738328 +0100 -@@ -0,0 +1,355 @@ ++++ linux-4.17/fs/aufs/xattr.c 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,356 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2014-2017 Junjiro R. Okajima ++ * Copyright (C) 2014-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -35051,7 +35183,7 @@ diff -Naur null/fs/aufs/xattr.c linux-4.15/fs/aufs/xattr.c + h_isrc = d_inode(h_src); + h_idst = d_inode(h_dst); + inode_unlock(h_idst); -+ vfsub_inode_lock_shared_nested(h_isrc, AuLsc_I_CHILD); ++ inode_lock_shared_nested(h_isrc, AuLsc_I_CHILD); + inode_lock_nested(h_idst, AuLsc_I_CHILD2); + unlocked = 0; + @@ -35288,12 +35420,13 @@ diff -Naur null/fs/aufs/xattr.c linux-4.15/fs/aufs/xattr.c +{ + sb->s_xattr = au_xattr_handlers; +} -diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c +diff -Naur null/fs/aufs/xino.c linux-4.17/fs/aufs/xino.c --- /dev/null -+++ linux-4.15/fs/aufs/xino.c 2018-02-25 02:38:09.207738436 +0100 -@@ -0,0 +1,1469 @@ ++++ linux-4.17/fs/aufs/xino.c 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,1593 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -35311,12 +35444,531 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + +/* + * external inode number translation table and bitmap ++ * ++ * things to consider ++ * - the lifetime ++ * + au_xino object ++ * + XINO files (xino, xib, xigen) ++ * + dynamic debugfs entries (xiN) ++ * + static debugfs entries (xib, xigen) ++ * + static sysfs entry (xi_path) ++ * - several entry points to handle them. ++ * + mount(2) without xino option (default) ++ * + mount(2) with xino option ++ * + mount(2) with noxino option ++ * + umount(2) ++ * + remount with add/del branches ++ * + remount with xino/noxino options + */ + +#include +#include +#include "aufs.h" + ++static aufs_bindex_t sbr_find_shared(struct super_block *sb, aufs_bindex_t btop, ++ aufs_bindex_t bbot, ++ struct super_block *h_sb) ++{ ++ /* todo: try binary-search if the branches are many */ ++ for (; btop <= bbot; btop++) ++ if (h_sb == au_sbr_sb(sb, btop)) ++ return btop; ++ return -1; ++} ++ ++/* ++ * find another branch who is on the same filesystem of the specified ++ * branch{@btgt}. search until @bbot. ++ */ ++static aufs_bindex_t is_sb_shared(struct super_block *sb, aufs_bindex_t btgt, ++ aufs_bindex_t bbot) ++{ ++ aufs_bindex_t bindex; ++ struct super_block *tgt_sb; ++ ++ tgt_sb = au_sbr_sb(sb, btgt); ++ bindex = sbr_find_shared(sb, /*btop*/0, btgt - 1, tgt_sb); ++ if (bindex < 0) ++ bindex = sbr_find_shared(sb, btgt + 1, bbot, tgt_sb); ++ ++ return bindex; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * stop unnecessary notify events at creating xino files ++ */ ++struct au_xino_lock_dir { ++ struct au_hinode *hdir; ++ struct dentry *parent; ++ struct inode *dir; ++}; ++ ++static struct dentry *au_dget_parent_lock(struct dentry *dentry, ++ unsigned int lsc) ++{ ++ struct dentry *parent; ++ struct inode *dir; ++ ++ parent = dget_parent(dentry); ++ dir = d_inode(parent); ++ inode_lock_nested(dir, lsc); ++#if 0 /* it should not happen */ ++ spin_lock(&dentry->d_lock); ++ if (unlikely(dentry->d_parent != parent)) { ++ spin_unlock(&dentry->d_lock); ++ inode_unlock(dir); ++ dput(parent); ++ parent = NULL; ++ goto out; ++ } ++ spin_unlock(&dentry->d_lock); ++ ++out: ++#endif ++ return parent; ++} ++ ++static void au_xino_lock_dir(struct super_block *sb, struct path *xipath, ++ struct au_xino_lock_dir *ldir) ++{ ++ aufs_bindex_t brid, bindex; ++ ++ ldir->hdir = NULL; ++ bindex = -1; ++ brid = au_xino_brid(sb); ++ if (brid >= 0) ++ bindex = au_br_index(sb, brid); ++ if (bindex >= 0) { ++ /* rw branch root */ ++ ldir->hdir = au_hi(d_inode(sb->s_root), bindex); ++ au_hn_inode_lock_nested(ldir->hdir, AuLsc_I_PARENT); ++ } else { ++ /* other */ ++ ldir->parent = au_dget_parent_lock(xipath->dentry, ++ AuLsc_I_PARENT); ++ ldir->dir = d_inode(ldir->parent); ++ } ++} ++ ++static void au_xino_unlock_dir(struct au_xino_lock_dir *ldir) ++{ ++ if (ldir->hdir) ++ au_hn_inode_unlock(ldir->hdir); ++ else { ++ inode_unlock(ldir->dir); ++ dput(ldir->parent); ++ } ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * create and set a new xino file ++ */ ++struct file *au_xino_create(struct super_block *sb, char *fpath, int silent) ++{ ++ struct file *file; ++ struct dentry *h_parent, *d; ++ struct inode *h_dir, *inode; ++ int err; ++ ++ /* ++ * at mount-time, and the xino file is the default path, ++ * hnotify is disabled so we have no notify events to ignore. ++ * when a user specified the xino, we cannot get au_hdir to be ignored. ++ */ ++ file = vfsub_filp_open(fpath, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE ++ /* | __FMODE_NONOTIFY */, ++ 0666); ++ if (IS_ERR(file)) { ++ if (!silent) ++ pr_err("open %s(%ld)\n", fpath, PTR_ERR(file)); ++ return file; ++ } ++ ++ /* keep file count */ ++ err = 0; ++ d = file->f_path.dentry; ++ h_parent = au_dget_parent_lock(d, AuLsc_I_PARENT); ++ /* mnt_want_write() is unnecessary here */ ++ h_dir = d_inode(h_parent); ++ inode = file_inode(file); ++ /* no delegation since it is just created */ ++ if (inode->i_nlink) ++ err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL, ++ /*force*/0); ++ inode_unlock(h_dir); ++ dput(h_parent); ++ if (unlikely(err)) { ++ if (!silent) ++ pr_err("unlink %s(%d)\n", fpath, err); ++ goto out; ++ } ++ ++ err = -EINVAL; ++ if (unlikely(sb == d->d_sb)) { ++ if (!silent) ++ pr_err("%s must be outside\n", fpath); ++ goto out; ++ } ++ if (unlikely(au_test_fs_bad_xino(d->d_sb))) { ++ if (!silent) ++ pr_err("xino doesn't support %s(%s)\n", ++ fpath, au_sbtype(d->d_sb)); ++ goto out; ++ } ++ return file; /* success */ ++ ++out: ++ fput(file); ++ file = ERR_PTR(err); ++ return file; ++} ++ ++/* ++ * create a new xinofile at the same place/path as @base. ++ */ ++struct file *au_xino_create2(struct super_block *sb, struct path *base, ++ struct file *copy_src) ++{ ++ struct file *file; ++ struct dentry *dentry, *parent; ++ struct inode *dir, *delegated; ++ struct qstr *name; ++ struct path path; ++ int err, do_unlock; ++ struct au_xino_lock_dir ldir; ++ ++ do_unlock = 1; ++ au_xino_lock_dir(sb, base, &ldir); ++ dentry = base->dentry; ++ parent = dentry->d_parent; /* dir inode is locked */ ++ dir = d_inode(parent); ++ IMustLock(dir); ++ ++ name = &dentry->d_name; ++ path.dentry = vfsub_lookup_one_len(name->name, parent, name->len); ++ if (IS_ERR(path.dentry)) { ++ file = (void *)path.dentry; ++ pr_err("%pd lookup err %ld\n", dentry, PTR_ERR(path.dentry)); ++ goto out; ++ } ++ ++ /* no need to mnt_want_write() since we call dentry_open() later */ ++ err = vfs_create(dir, path.dentry, 0666, NULL); ++ if (unlikely(err)) { ++ file = ERR_PTR(err); ++ pr_err("%pd create err %d\n", dentry, err); ++ goto out_dput; ++ } ++ ++ path.mnt = base->mnt; ++ file = vfsub_dentry_open(&path, ++ O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE ++ /* | __FMODE_NONOTIFY */); ++ if (IS_ERR(file)) { ++ pr_err("%pd open err %ld\n", dentry, PTR_ERR(file)); ++ goto out_dput; ++ } ++ ++ delegated = NULL; ++ err = vfsub_unlink(dir, &file->f_path, &delegated, /*force*/0); ++ au_xino_unlock_dir(&ldir); ++ do_unlock = 0; ++ if (unlikely(err == -EWOULDBLOCK)) { ++ pr_warn("cannot retry for NFSv4 delegation" ++ " for an internal unlink\n"); ++ iput(delegated); ++ } ++ if (unlikely(err)) { ++ pr_err("%pd unlink err %d\n", dentry, err); ++ goto out_fput; ++ } ++ ++ if (copy_src) { ++ /* no one can touch copy_src xino */ ++ err = au_copy_file(file, copy_src, vfsub_f_size_read(copy_src)); ++ if (unlikely(err)) { ++ pr_err("%pd copy err %d\n", dentry, err); ++ goto out_fput; ++ } ++ } ++ goto out_dput; /* success */ ++ ++out_fput: ++ fput(file); ++ file = ERR_PTR(err); ++out_dput: ++ dput(path.dentry); ++out: ++ if (do_unlock) ++ au_xino_unlock_dir(&ldir); ++ return file; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * truncate xino files ++ */ ++int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex) ++{ ++ int err; ++ unsigned long jiffy; ++ blkcnt_t blocks; ++ aufs_bindex_t bbot; ++ struct kstatfs *st; ++ struct au_branch *br; ++ struct file *new_xino, *file; ++ struct path *path; ++ ++ err = -ENOMEM; ++ st = kmalloc(sizeof(*st), GFP_NOFS); ++ if (unlikely(!st)) ++ goto out; ++ ++ err = -EINVAL; ++ bbot = au_sbbot(sb); ++ if (unlikely(bindex < 0 || bbot < bindex)) ++ goto out_st; ++ br = au_sbr(sb, bindex); ++ file = au_xino_file(br); ++ if (!file) ++ goto out_st; ++ ++ path = &file->f_path; ++ err = vfs_statfs(path, st); ++ if (unlikely(err)) ++ AuErr1("statfs err %d, ignored\n", err); ++ jiffy = jiffies; ++ blocks = file_inode(file)->i_blocks; ++ pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n", ++ bindex, (u64)blocks, st->f_bfree, st->f_blocks); ++ ++ new_xino = au_xino_create2(sb, path, file); ++ err = PTR_ERR(new_xino); ++ if (IS_ERR(new_xino)) { ++ pr_err("err %d, ignored\n", err); ++ goto out_st; ++ } ++ err = 0; ++ au_xino_file_set(br, new_xino); ++ ++ err = vfs_statfs(&new_xino->f_path, st); ++ if (!err) { ++ pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n", ++ bindex, (u64)file_inode(new_xino)->i_blocks, ++ st->f_bfree, st->f_blocks); ++ if (file_inode(new_xino)->i_blocks < blocks) ++ au_sbi(sb)->si_xino_jiffy = jiffy; ++ } else ++ AuErr1("statfs err %d, ignored\n", err); ++ fput(new_xino); ++ ++out_st: ++ kfree(st); ++out: ++ return err; ++} ++ ++struct xino_do_trunc_args { ++ struct super_block *sb; ++ struct au_branch *br; ++}; ++ ++static void xino_do_trunc(void *_args) ++{ ++ struct xino_do_trunc_args *args = _args; ++ struct super_block *sb; ++ struct au_branch *br; ++ struct inode *dir; ++ int err; ++ aufs_bindex_t bindex; ++ ++ err = 0; ++ sb = args->sb; ++ dir = d_inode(sb->s_root); ++ br = args->br; ++ ++ si_noflush_write_lock(sb); ++ ii_read_lock_parent(dir); ++ bindex = au_br_index(sb, br->br_id); ++ err = au_xino_trunc(sb, bindex); ++ ii_read_unlock(dir); ++ if (unlikely(err)) ++ pr_warn("err b%d, (%d)\n", bindex, err); ++ atomic_dec(&br->br_xino->xi_truncating); ++ au_br_put(br); ++ si_write_unlock(sb); ++ au_nwt_done(&au_sbi(sb)->si_nowait); ++ kfree(args); ++} ++ ++static int xino_trunc_test(struct super_block *sb, struct au_branch *br) ++{ ++ int err; ++ struct kstatfs st; ++ struct au_sbinfo *sbinfo; ++ struct file *file; ++ ++ /* todo: si_xino_expire and the ratio should be customizable */ ++ sbinfo = au_sbi(sb); ++ if (time_before(jiffies, ++ sbinfo->si_xino_jiffy + sbinfo->si_xino_expire)) ++ return 0; ++ ++ /* truncation border */ ++ file = au_xino_file(br); ++ AuDebugOn(!file); ++ err = vfs_statfs(&file->f_path, &st); ++ if (unlikely(err)) { ++ AuErr1("statfs err %d, ignored\n", err); ++ return 0; ++ } ++ if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC) ++ return 0; ++ ++ return 1; ++} ++ ++static void xino_try_trunc(struct super_block *sb, struct au_branch *br) ++{ ++ struct xino_do_trunc_args *args; ++ int wkq_err; ++ ++ if (!xino_trunc_test(sb, br)) ++ return; ++ ++ if (atomic_inc_return(&br->br_xino->xi_truncating) > 1) ++ goto out; ++ ++ /* lock and kfree() will be called in trunc_xino() */ ++ args = kmalloc(sizeof(*args), GFP_NOFS); ++ if (unlikely(!args)) { ++ AuErr1("no memory\n"); ++ goto out; ++ } ++ ++ au_br_get(br); ++ args->sb = sb; ++ args->br = br; ++ wkq_err = au_wkq_nowait(xino_do_trunc, args, sb, /*flags*/0); ++ if (!wkq_err) ++ return; /* success */ ++ ++ pr_err("wkq %d\n", wkq_err); ++ au_br_put(br); ++ kfree(args); ++ ++out: ++ atomic_dec(&br->br_xino->xi_truncating); ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * read @ino from xinofile for the specified branch{@sb, @bindex} ++ * at the position of @h_ino. ++ */ ++int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t *ino) ++{ ++ int err; ++ ssize_t sz; ++ loff_t pos; ++ struct au_branch *br; ++ struct file *file; ++ struct au_sbinfo *sbinfo; ++ ++ *ino = 0; ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return 0; /* no xino */ ++ ++ err = 0; ++ sbinfo = au_sbi(sb); ++ pos = h_ino; ++ if (unlikely(au_loff_max / sizeof(*ino) - 1 < pos)) { ++ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); ++ return -EFBIG; ++ } ++ pos *= sizeof(*ino); ++ ++ br = au_sbr(sb, bindex); ++ file = au_xino_file(br); ++ if (vfsub_f_size_read(file) < pos + sizeof(*ino)) ++ return 0; /* no ino */ ++ ++ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &pos); ++ if (sz == sizeof(*ino)) ++ return 0; /* success */ ++ ++ err = sz; ++ if (unlikely(sz >= 0)) { ++ err = -EIO; ++ AuIOErr("xino read error (%zd)\n", sz); ++ } ++ ++ return err; ++} ++ ++static int au_xino_do_write(vfs_writef_t write, struct file *file, ++ ino_t h_ino, ino_t ino) ++{ ++ loff_t pos; ++ ssize_t sz; ++ ++ pos = h_ino; ++ if (unlikely(au_loff_max / sizeof(ino) - 1 < pos)) { ++ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); ++ return -EFBIG; ++ } ++ pos *= sizeof(ino); ++ sz = xino_fwrite(write, file, &ino, sizeof(ino), &pos); ++ if (sz == sizeof(ino)) ++ return 0; /* success */ ++ ++ AuIOErr("write failed (%zd)\n", sz); ++ return -EIO; ++} ++ ++/* ++ * write @ino to the xinofile for the specified branch{@sb, @bindex} ++ * at the position of @h_ino. ++ * even if @ino is zero, it is written to the xinofile and means no entry. ++ * if the size of the xino file on a specific filesystem exceeds the watermark, ++ * try truncating it. ++ */ ++int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ ino_t ino) ++{ ++ int err; ++ unsigned int mnt_flags; ++ struct au_branch *br; ++ ++ BUILD_BUG_ON(sizeof(long long) != sizeof(au_loff_max) ++ || ((loff_t)-1) > 0); ++ SiMustAnyLock(sb); ++ ++ mnt_flags = au_mntflags(sb); ++ if (!au_opt_test(mnt_flags, XINO)) ++ return 0; ++ ++ br = au_sbr(sb, bindex); ++ err = au_xino_do_write(au_sbi(sb)->si_xwrite, au_xino_file(br), h_ino, ++ ino); ++ if (!err) { ++ if (au_opt_test(mnt_flags, TRUNC_XINO) ++ && au_test_fs_trunc_xino(au_br_sb(br))) ++ xino_try_trunc(sb, br); ++ return 0; /* success */ ++ } ++ ++ AuIOErr("write failed (%d)\n", err); ++ return -EIO; ++} ++ +static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf, + size_t size, loff_t *pos); + @@ -35376,7 +36028,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c +} + +static ssize_t xino_fread_wkq(vfs_readf_t func, struct file *file, void *buf, -+ size_t size, loff_t *pos) ++ size_t size, loff_t *pos) +{ + ssize_t err; + int wkq_err; @@ -35396,8 +36048,6 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +static ssize_t xino_fwrite_wkq(vfs_writef_t func, struct file *file, void *buf, + size_t size, loff_t *pos); + @@ -35501,348 +36151,8 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c +/* ---------------------------------------------------------------------- */ + +/* -+ * create a new xinofile at the same place/path as @base_file. ++ * inode number bitmap + */ -+struct file *au_xino_create2(struct file *base_file, struct file *copy_src) -+{ -+ struct file *file; -+ struct dentry *base, *parent; -+ struct inode *dir, *delegated; -+ struct qstr *name; -+ struct path path; -+ int err; -+ -+ base = base_file->f_path.dentry; -+ parent = base->d_parent; /* dir inode is locked */ -+ dir = d_inode(parent); -+ IMustLock(dir); -+ -+ file = ERR_PTR(-EINVAL); -+ name = &base->d_name; -+ path.dentry = vfsub_lookup_one_len(name->name, parent, name->len); -+ if (IS_ERR(path.dentry)) { -+ file = (void *)path.dentry; -+ pr_err("%pd lookup err %ld\n", -+ base, PTR_ERR(path.dentry)); -+ goto out; -+ } -+ -+ /* no need to mnt_want_write() since we call dentry_open() later */ -+ err = vfs_create(dir, path.dentry, S_IRUGO | S_IWUGO, NULL); -+ if (unlikely(err)) { -+ file = ERR_PTR(err); -+ pr_err("%pd create err %d\n", base, err); -+ goto out_dput; -+ } -+ -+ path.mnt = base_file->f_path.mnt; -+ file = vfsub_dentry_open(&path, -+ O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE -+ /* | __FMODE_NONOTIFY */); -+ if (IS_ERR(file)) { -+ pr_err("%pd open err %ld\n", base, PTR_ERR(file)); -+ goto out_dput; -+ } -+ -+ delegated = NULL; -+ err = vfsub_unlink(dir, &file->f_path, &delegated, /*force*/0); -+ if (unlikely(err == -EWOULDBLOCK)) { -+ pr_warn("cannot retry for NFSv4 delegation" -+ " for an internal unlink\n"); -+ iput(delegated); -+ } -+ if (unlikely(err)) { -+ pr_err("%pd unlink err %d\n", base, err); -+ goto out_fput; -+ } -+ -+ if (copy_src) { -+ /* no one can touch copy_src xino */ -+ err = au_copy_file(file, copy_src, vfsub_f_size_read(copy_src)); -+ if (unlikely(err)) { -+ pr_err("%pd copy err %d\n", base, err); -+ goto out_fput; -+ } -+ } -+ goto out_dput; /* success */ -+ -+out_fput: -+ fput(file); -+ file = ERR_PTR(err); -+out_dput: -+ dput(path.dentry); -+out: -+ return file; -+} -+ -+struct au_xino_lock_dir { -+ struct au_hinode *hdir; -+ struct dentry *parent; -+ struct inode *dir; -+}; -+ -+static void au_xino_lock_dir(struct super_block *sb, struct file *xino, -+ struct au_xino_lock_dir *ldir) -+{ -+ aufs_bindex_t brid, bindex; -+ -+ ldir->hdir = NULL; -+ bindex = -1; -+ brid = au_xino_brid(sb); -+ if (brid >= 0) -+ bindex = au_br_index(sb, brid); -+ if (bindex >= 0) { -+ ldir->hdir = au_hi(d_inode(sb->s_root), bindex); -+ au_hn_inode_lock_nested(ldir->hdir, AuLsc_I_PARENT); -+ } else { -+ ldir->parent = dget_parent(xino->f_path.dentry); -+ ldir->dir = d_inode(ldir->parent); -+ inode_lock_nested(ldir->dir, AuLsc_I_PARENT); -+ } -+} -+ -+static void au_xino_unlock_dir(struct au_xino_lock_dir *ldir) -+{ -+ if (ldir->hdir) -+ au_hn_inode_unlock(ldir->hdir); -+ else { -+ inode_unlock(ldir->dir); -+ dput(ldir->parent); -+ } -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* trucate xino files asynchronously */ -+ -+int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex) -+{ -+ int err; -+ unsigned long jiffy; -+ blkcnt_t blocks; -+ aufs_bindex_t bi, bbot; -+ struct kstatfs *st; -+ struct au_branch *br; -+ struct file *new_xino, *file; -+ struct super_block *h_sb; -+ struct au_xino_lock_dir ldir; -+ -+ err = -ENOMEM; -+ st = kmalloc(sizeof(*st), GFP_NOFS); -+ if (unlikely(!st)) -+ goto out; -+ -+ err = -EINVAL; -+ bbot = au_sbbot(sb); -+ if (unlikely(bindex < 0 || bbot < bindex)) -+ goto out_st; -+ br = au_sbr(sb, bindex); -+ file = br->br_xino.xi_file; -+ if (!file) -+ goto out_st; -+ -+ err = vfs_statfs(&file->f_path, st); -+ if (unlikely(err)) -+ AuErr1("statfs err %d, ignored\n", err); -+ jiffy = jiffies; -+ blocks = file_inode(file)->i_blocks; -+ pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)blocks, st->f_bfree, st->f_blocks); -+ -+ au_xino_lock_dir(sb, file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ new_xino = au_xino_create2(file, file); -+ au_xino_unlock_dir(&ldir); -+ err = PTR_ERR(new_xino); -+ if (IS_ERR(new_xino)) { -+ pr_err("err %d, ignored\n", err); -+ goto out_st; -+ } -+ err = 0; -+ fput(file); -+ br->br_xino.xi_file = new_xino; -+ -+ h_sb = au_br_sb(br); -+ for (bi = 0; bi <= bbot; bi++) { -+ if (unlikely(bi == bindex)) -+ continue; -+ br = au_sbr(sb, bi); -+ if (au_br_sb(br) != h_sb) -+ continue; -+ -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = new_xino; -+ get_file(new_xino); -+ } -+ -+ err = vfs_statfs(&new_xino->f_path, st); -+ if (!err) { -+ pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)file_inode(new_xino)->i_blocks, -+ st->f_bfree, st->f_blocks); -+ if (file_inode(new_xino)->i_blocks < blocks) -+ au_sbi(sb)->si_xino_jiffy = jiffy; -+ } else -+ AuErr1("statfs err %d, ignored\n", err); -+ -+out_st: -+ kfree(st); -+out: -+ return err; -+} -+ -+struct xino_do_trunc_args { -+ struct super_block *sb; -+ struct au_branch *br; -+}; -+ -+static void xino_do_trunc(void *_args) -+{ -+ struct xino_do_trunc_args *args = _args; -+ struct super_block *sb; -+ struct au_branch *br; -+ struct inode *dir; -+ int err; -+ aufs_bindex_t bindex; -+ -+ err = 0; -+ sb = args->sb; -+ dir = d_inode(sb->s_root); -+ br = args->br; -+ -+ si_noflush_write_lock(sb); -+ ii_read_lock_parent(dir); -+ bindex = au_br_index(sb, br->br_id); -+ err = au_xino_trunc(sb, bindex); -+ ii_read_unlock(dir); -+ if (unlikely(err)) -+ pr_warn("err b%d, (%d)\n", bindex, err); -+ atomic_dec(&br->br_xino_running); -+ au_br_put(br); -+ si_write_unlock(sb); -+ au_nwt_done(&au_sbi(sb)->si_nowait); -+ kfree(args); -+} -+ -+static int xino_trunc_test(struct super_block *sb, struct au_branch *br) -+{ -+ int err; -+ struct kstatfs st; -+ struct au_sbinfo *sbinfo; -+ -+ /* todo: si_xino_expire and the ratio should be customizable */ -+ sbinfo = au_sbi(sb); -+ if (time_before(jiffies, -+ sbinfo->si_xino_jiffy + sbinfo->si_xino_expire)) -+ return 0; -+ -+ /* truncation border */ -+ err = vfs_statfs(&br->br_xino.xi_file->f_path, &st); -+ if (unlikely(err)) { -+ AuErr1("statfs err %d, ignored\n", err); -+ return 0; -+ } -+ if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC) -+ return 0; -+ -+ return 1; -+} -+ -+static void xino_try_trunc(struct super_block *sb, struct au_branch *br) -+{ -+ struct xino_do_trunc_args *args; -+ int wkq_err; -+ -+ if (!xino_trunc_test(sb, br)) -+ return; -+ -+ if (atomic_inc_return(&br->br_xino_running) > 1) -+ goto out; -+ -+ /* lock and kfree() will be called in trunc_xino() */ -+ args = kmalloc(sizeof(*args), GFP_NOFS); -+ if (unlikely(!args)) { -+ AuErr1("no memory\n"); -+ goto out; -+ } -+ -+ au_br_get(br); -+ args->sb = sb; -+ args->br = br; -+ wkq_err = au_wkq_nowait(xino_do_trunc, args, sb, /*flags*/0); -+ if (!wkq_err) -+ return; /* success */ -+ -+ pr_err("wkq %d\n", wkq_err); -+ au_br_put(br); -+ kfree(args); -+ -+out: -+ atomic_dec(&br->br_xino_running); -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+static int au_xino_do_write(vfs_writef_t write, struct file *file, -+ ino_t h_ino, ino_t ino) -+{ -+ loff_t pos; -+ ssize_t sz; -+ -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(ino); -+ sz = xino_fwrite(write, file, &ino, sizeof(ino), &pos); -+ if (sz == sizeof(ino)) -+ return 0; /* success */ -+ -+ AuIOErr("write failed (%zd)\n", sz); -+ return -EIO; -+} -+ -+/* -+ * write @ino to the xinofile for the specified branch{@sb, @bindex} -+ * at the position of @h_ino. -+ * even if @ino is zero, it is written to the xinofile and means no entry. -+ * if the size of the xino file on a specific filesystem exceeds the watermark, -+ * try truncating it. -+ */ -+int au_xino_write(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t ino) -+{ -+ int err; -+ unsigned int mnt_flags; -+ struct au_branch *br; -+ -+ BUILD_BUG_ON(sizeof(long long) != sizeof(au_loff_max) -+ || ((loff_t)-1) > 0); -+ SiMustAnyLock(sb); -+ -+ mnt_flags = au_mntflags(sb); -+ if (!au_opt_test(mnt_flags, XINO)) -+ return 0; -+ -+ br = au_sbr(sb, bindex); -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, br->br_xino.xi_file, -+ h_ino, ino); -+ if (!err) { -+ if (au_opt_test(mnt_flags, TRUNC_XINO) -+ && au_test_fs_trunc_xino(au_br_sb(br))) -+ xino_try_trunc(sb, br); -+ return 0; /* success */ -+ } -+ -+ AuIOErr("write failed (%d)\n", err); -+ return -EIO; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* aufs inode number bitmap */ -+ +static const int page_bits = (int)PAGE_SIZE * BITS_PER_BYTE; +static ino_t xib_calc_ino(unsigned long pindex, int bit) +{ @@ -35907,8 +36217,6 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +static void au_xib_clear_bit(struct inode *inode) +{ + int err, bit; @@ -35931,310 +36239,11 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + mutex_unlock(&sbinfo->si_xib_mtx); +} + -+/* for s_op->delete_inode() */ -+void au_xino_delete_inode(struct inode *inode, const int unlinked) -+{ -+ int err; -+ unsigned int mnt_flags; -+ aufs_bindex_t bindex, bbot, bi; -+ unsigned char try_trunc; -+ struct au_iinfo *iinfo; -+ struct super_block *sb; -+ struct au_hinode *hi; -+ struct inode *h_inode; -+ struct au_branch *br; -+ vfs_writef_t xwrite; -+ -+ AuDebugOn(au_is_bad_inode(inode)); -+ -+ sb = inode->i_sb; -+ mnt_flags = au_mntflags(sb); -+ if (!au_opt_test(mnt_flags, XINO) -+ || inode->i_ino == AUFS_ROOT_INO) -+ return; -+ -+ if (unlinked) { -+ au_xigen_inc(inode); -+ au_xib_clear_bit(inode); -+ } -+ -+ iinfo = au_ii(inode); -+ bindex = iinfo->ii_btop; -+ if (bindex < 0) -+ return; -+ -+ xwrite = au_sbi(sb)->si_xwrite; -+ try_trunc = !!au_opt_test(mnt_flags, TRUNC_XINO); -+ hi = au_hinode(iinfo, bindex); -+ bbot = iinfo->ii_bbot; -+ for (; bindex <= bbot; bindex++, hi++) { -+ h_inode = hi->hi_inode; -+ if (!h_inode -+ || (!unlinked && h_inode->i_nlink)) -+ continue; -+ -+ /* inode may not be revalidated */ -+ bi = au_br_index(sb, hi->hi_id); -+ if (bi < 0) -+ continue; -+ -+ br = au_sbr(sb, bi); -+ err = au_xino_do_write(xwrite, br->br_xino.xi_file, -+ h_inode->i_ino, /*ino*/0); -+ if (!err && try_trunc -+ && au_test_fs_trunc_xino(au_br_sb(br))) -+ xino_try_trunc(sb, br); -+ } -+} -+ -+/* get an unused inode number from bitmap */ -+ino_t au_xino_new_ino(struct super_block *sb) -+{ -+ ino_t ino; -+ unsigned long *p, pindex, ul, pend; -+ struct au_sbinfo *sbinfo; -+ struct file *file; -+ int free_bit, err; -+ -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ return iunique(sb, AUFS_FIRST_INO); -+ -+ sbinfo = au_sbi(sb); -+ mutex_lock(&sbinfo->si_xib_mtx); -+ p = sbinfo->si_xib_buf; -+ free_bit = sbinfo->si_xib_next_bit; -+ if (free_bit < page_bits && !test_bit(free_bit, p)) -+ goto out; /* success */ -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ -+ pindex = sbinfo->si_xib_last_pindex; -+ for (ul = pindex - 1; ul < ULONG_MAX; ul--) { -+ err = xib_pindex(sb, ul); -+ if (unlikely(err)) -+ goto out_err; -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ } -+ -+ file = sbinfo->si_xib; -+ pend = vfsub_f_size_read(file) / PAGE_SIZE; -+ for (ul = pindex + 1; ul <= pend; ul++) { -+ err = xib_pindex(sb, ul); -+ if (unlikely(err)) -+ goto out_err; -+ free_bit = find_first_zero_bit(p, page_bits); -+ if (free_bit < page_bits) -+ goto out; /* success */ -+ } -+ BUG(); -+ -+out: -+ set_bit(free_bit, p); -+ sbinfo->si_xib_next_bit = free_bit + 1; -+ pindex = sbinfo->si_xib_last_pindex; -+ mutex_unlock(&sbinfo->si_xib_mtx); -+ ino = xib_calc_ino(pindex, free_bit); -+ AuDbg("i%lu\n", (unsigned long)ino); -+ return ino; -+out_err: -+ mutex_unlock(&sbinfo->si_xib_mtx); -+ AuDbg("i0\n"); -+ return 0; -+} -+ -+/* -+ * read @ino from xinofile for the specified branch{@sb, @bindex} -+ * at the position of @h_ino. -+ * if @ino does not exist and @do_new is true, get new one. -+ */ -+int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ ino_t *ino) -+{ -+ int err; -+ ssize_t sz; -+ loff_t pos; -+ struct file *file; -+ struct au_sbinfo *sbinfo; -+ -+ *ino = 0; -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ return 0; /* no xino */ -+ -+ err = 0; -+ sbinfo = au_sbi(sb); -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(*ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(*ino); -+ -+ file = au_sbr(sb, bindex)->br_xino.xi_file; -+ if (vfsub_f_size_read(file) < pos + sizeof(*ino)) -+ return 0; /* no ino */ -+ -+ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &pos); -+ if (sz == sizeof(*ino)) -+ return 0; /* success */ -+ -+ err = sz; -+ if (unlikely(sz >= 0)) { -+ err = -EIO; -+ AuIOErr("xino read error (%zd)\n", sz); -+ } -+ -+ return err; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* create and set a new xino file */ -+ -+struct file *au_xino_create(struct super_block *sb, char *fname, int silent) -+{ -+ struct file *file; -+ struct dentry *h_parent, *d; -+ struct inode *h_dir, *inode; -+ int err; -+ -+ /* -+ * at mount-time, and the xino file is the default path, -+ * hnotify is disabled so we have no notify events to ignore. -+ * when a user specified the xino, we cannot get au_hdir to be ignored. -+ */ -+ file = vfsub_filp_open(fname, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE -+ /* | __FMODE_NONOTIFY */, -+ S_IRUGO | S_IWUGO); -+ if (IS_ERR(file)) { -+ if (!silent) -+ pr_err("open %s(%ld)\n", fname, PTR_ERR(file)); -+ return file; -+ } -+ -+ /* keep file count */ -+ err = 0; -+ inode = file_inode(file); -+ h_parent = dget_parent(file->f_path.dentry); -+ h_dir = d_inode(h_parent); -+ inode_lock_nested(h_dir, AuLsc_I_PARENT); -+ /* mnt_want_write() is unnecessary here */ -+ /* no delegation since it is just created */ -+ if (inode->i_nlink) -+ err = vfsub_unlink(h_dir, &file->f_path, /*delegated*/NULL, -+ /*force*/0); -+ inode_unlock(h_dir); -+ dput(h_parent); -+ if (unlikely(err)) { -+ if (!silent) -+ pr_err("unlink %s(%d)\n", fname, err); -+ goto out; -+ } -+ -+ err = -EINVAL; -+ d = file->f_path.dentry; -+ if (unlikely(sb == d->d_sb)) { -+ if (!silent) -+ pr_err("%s must be outside\n", fname); -+ goto out; -+ } -+ if (unlikely(au_test_fs_bad_xino(d->d_sb))) { -+ if (!silent) -+ pr_err("xino doesn't support %s(%s)\n", -+ fname, au_sbtype(d->d_sb)); -+ goto out; -+ } -+ return file; /* success */ -+ -+out: -+ fput(file); -+ file = ERR_PTR(err); -+ return file; -+} -+ -+/* -+ * find another branch who is on the same filesystem of the specified -+ * branch{@btgt}. search until @bbot. -+ */ -+static int is_sb_shared(struct super_block *sb, aufs_bindex_t btgt, -+ aufs_bindex_t bbot) -+{ -+ aufs_bindex_t bindex; -+ struct super_block *tgt_sb = au_sbr_sb(sb, btgt); -+ -+ for (bindex = 0; bindex < btgt; bindex++) -+ if (unlikely(tgt_sb == au_sbr_sb(sb, bindex))) -+ return bindex; -+ for (bindex++; bindex <= bbot; bindex++) -+ if (unlikely(tgt_sb == au_sbr_sb(sb, bindex))) -+ return bindex; -+ return -1; -+} -+ +/* ---------------------------------------------------------------------- */ + +/* -+ * initialize the xinofile for the specified branch @br -+ * at the place/path where @base_file indicates. -+ * test whether another branch is on the same filesystem or not, -+ * if @do_test is true. ++ * truncate a xino bitmap file + */ -+int au_xino_br(struct super_block *sb, struct au_branch *br, ino_t h_ino, -+ struct file *base_file, int do_test) -+{ -+ int err; -+ ino_t ino; -+ aufs_bindex_t bbot, bindex; -+ struct au_branch *shared_br, *b; -+ struct file *file; -+ struct super_block *tgt_sb; -+ -+ shared_br = NULL; -+ bbot = au_sbbot(sb); -+ if (do_test) { -+ tgt_sb = au_br_sb(br); -+ for (bindex = 0; bindex <= bbot; bindex++) { -+ b = au_sbr(sb, bindex); -+ if (tgt_sb == au_br_sb(b)) { -+ shared_br = b; -+ break; -+ } -+ } -+ } -+ -+ if (!shared_br || !shared_br->br_xino.xi_file) { -+ struct au_xino_lock_dir ldir; -+ -+ au_xino_lock_dir(sb, base_file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ file = au_xino_create2(base_file, NULL); -+ au_xino_unlock_dir(&ldir); -+ err = PTR_ERR(file); -+ if (IS_ERR(file)) -+ goto out; -+ br->br_xino.xi_file = file; -+ } else { -+ br->br_xino.xi_file = shared_br->br_xino.xi_file; -+ get_file(br->br_xino.xi_file); -+ } -+ -+ ino = AUFS_ROOT_INO; -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, br->br_xino.xi_file, -+ h_ino, ino); -+ if (unlikely(err)) { -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = NULL; -+ } -+ -+out: -+ return err; -+} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* trucate a xino bitmap file */ + +/* todo: slow */ +static int do_xib_restore(struct super_block *sb, struct file *file, void *page) @@ -36285,6 +36294,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + int err; + aufs_bindex_t bindex, bbot; + void *page; ++ struct au_branch *br; + + err = -ENOMEM; + page = (void *)__get_free_page(GFP_NOFS); @@ -36294,11 +36304,11 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + err = 0; + bbot = au_sbbot(sb); + for (bindex = 0; !err && bindex <= bbot; bindex++) -+ if (!bindex || is_sb_shared(sb, bindex, bindex - 1) < 0) -+ err = do_xib_restore -+ (sb, au_sbr(sb, bindex)->br_xino.xi_file, page); -+ else -+ AuDbg("b%d\n", bindex); ++ if (!bindex || is_sb_shared(sb, bindex, bindex - 1) < 0) { ++ br = au_sbr(sb, bindex); ++ err = do_xib_restore(sb, au_xino_file(br), page); ++ } else ++ AuDbg("skip shared b%d\n", bindex); + free_page((unsigned long)page); + +out: @@ -36310,7 +36320,6 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + int err; + ssize_t sz; + loff_t pos; -+ struct au_xino_lock_dir ldir; + struct au_sbinfo *sbinfo; + unsigned long *p; + struct file *file; @@ -36326,10 +36335,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + if (vfsub_f_size_read(file) <= PAGE_SIZE) + goto out; + -+ au_xino_lock_dir(sb, file, &ldir); -+ /* mnt_want_write() is unnecessary here */ -+ file = au_xino_create2(sbinfo->si_xib, NULL); -+ au_xino_unlock_dir(&ldir); ++ file = au_xino_create2(sb, &sbinfo->si_xib->f_path, NULL); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -36359,6 +36365,100 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + +/* ---------------------------------------------------------------------- */ + ++struct au_xino *au_xino_alloc(void) ++{ ++ struct au_xino *xi; ++ ++ xi = kzalloc(sizeof(*xi), GFP_NOFS); ++ if (unlikely(!xi)) ++ goto out; ++ ++ xi->xi_nondir.total = 8; /* initial size */ ++ xi->xi_nondir.array = kcalloc(xi->xi_nondir.total, sizeof(ino_t), ++ GFP_NOFS); ++ if (unlikely(!xi->xi_nondir.array)) ++ goto out_free; ++ ++ spin_lock_init(&xi->xi_nondir.spin); ++ init_waitqueue_head(&xi->xi_nondir.wqh); ++ atomic_set(&xi->xi_truncating, 0); ++ kref_init(&xi->xi_kref); ++ goto out; /* success */ ++ ++out_free: ++ kfree(xi); ++ xi = NULL; ++out: ++ return xi; ++} ++ ++static int au_xino_init(struct au_branch *br, struct file *file) ++{ ++ int err; ++ struct au_xino *xi; ++ ++ err = 0; ++ xi = au_xino_alloc(); ++ if (unlikely(!xi)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ get_file(file); ++ xi->xi_file = file; ++ AuDebugOn(br->br_xino); ++ br->br_xino = xi; ++ ++out: ++ return err; ++} ++ ++static void au_xino_release(struct kref *kref) ++{ ++ struct au_xino *xi; ++ int i; ++ ++ xi = container_of(kref, struct au_xino, xi_kref); ++ if (xi->xi_file) ++ fput(xi->xi_file); ++ for (i = xi->xi_nondir.total - 1; i >= 0; i--) ++ AuDebugOn(xi->xi_nondir.array[i]); ++ kfree(xi->xi_nondir.array); ++ kfree(xi); ++} ++ ++int au_xino_put(struct au_branch *br) ++{ ++ int ret; ++ struct au_xino *xi; ++ ++ ret = 0; ++ xi = br->br_xino; ++ if (xi) { ++ br->br_xino = NULL; ++ ret = kref_put(&xi->xi_kref, au_xino_release); ++ } ++ ++ return ret; ++} ++ ++void au_xino_file_set(struct au_branch *br, struct file *file) ++{ ++ struct au_xino *xi; ++ struct file *f; ++ ++ if (file) ++ get_file(file); ++ xi = br->br_xino; ++ AuDebugOn(!xi); ++ f = xi->xi_file; ++ if (f) ++ fput(f); ++ xi->xi_file = file; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +/* + * xino mount option handlers + */ @@ -36371,8 +36471,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ sbinfo->si_xread = NULL; -+ sbinfo->si_xwrite = NULL; ++ /* unnecessary to clear sbinfo->si_xread and ->si_xwrite */ + if (sbinfo->si_xib) + fput(sbinfo->si_xib); + sbinfo->si_xib = NULL; @@ -36381,7 +36480,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + sbinfo->si_xib_buf = NULL; +} + -+static int au_xino_set_xib(struct super_block *sb, struct file *base) ++static int au_xino_set_xib(struct super_block *sb, struct path *path) +{ + int err; + loff_t pos; @@ -36391,7 +36490,7 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + SiMustWriteLock(sb); + + sbinfo = au_sbi(sb); -+ file = au_xino_create2(base, sbinfo->si_xib); ++ file = au_xino_create2(sb, path, sbinfo->si_xib); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; @@ -36428,9 +36527,8 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c +out_unset: + fput(sbinfo->si_xib); + sbinfo->si_xib = NULL; -+ sbinfo->si_xread = NULL; -+ sbinfo->si_xwrite = NULL; +out: ++ AuTraceErr(err); + return err; +} + @@ -36443,79 +36541,90 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + bbot = au_sbbot(sb); + for (bindex = 0; bindex <= bbot; bindex++) { + br = au_sbr(sb, bindex); -+ if (!br || !br->br_xino.xi_file) -+ continue; -+ -+ fput(br->br_xino.xi_file); -+ br->br_xino.xi_file = NULL; ++ AuDebugOn(!br); ++ au_xino_put(br); + } +} + -+static int au_xino_set_br(struct super_block *sb, struct file *base) ++static void au_xino_set_br_shared(struct super_block *sb, struct au_branch *br, ++ aufs_bindex_t bshared) ++{ ++ struct au_branch *brshared; ++ ++ brshared = au_sbr(sb, bshared); ++ AuDebugOn(!brshared->br_xino); ++ AuDebugOn(!brshared->br_xino->xi_file); ++ if (br->br_xino != brshared->br_xino) { ++ au_xino_get(brshared); ++ au_xino_put(br); ++ br->br_xino = brshared->br_xino; ++ } ++} ++ ++struct au_xino_do_set_br { ++ vfs_writef_t writef; ++ struct au_branch *br; ++ ino_t h_ino; ++ aufs_bindex_t bshared; ++}; ++ ++static int au_xino_do_set_br(struct super_block *sb, struct path *path, ++ struct au_xino_do_set_br *args) +{ + int err; -+ ino_t ino; -+ aufs_bindex_t bindex, bbot, bshared; -+ struct { -+ struct file *old, *new; -+ } *fpair, *p; -+ struct au_branch *br; ++ struct file *file; ++ ++ if (args->bshared >= 0) { ++ /* shared xino */ ++ au_xino_set_br_shared(sb, args->br, args->bshared); ++ file = au_xino_file(args->br); ++ goto out_ino; /* success */ ++ } ++ ++ /* new xino */ ++ file = au_xino_create2(sb, path, au_xino_file(args->br)); ++ err = PTR_ERR(file); ++ if (IS_ERR(file)) ++ goto out; ++ if (!args->br->br_xino) { ++ err = au_xino_init(args->br, file); ++ fput(file); ++ if (unlikely(err)) ++ goto out; ++ } else { ++ au_xino_file_set(args->br, file); ++ fput(file); ++ } ++ ++out_ino: ++ err = au_xino_do_write(args->writef, file, args->h_ino, AUFS_ROOT_INO); ++out: ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_xino_set_br(struct super_block *sb, struct path *path) ++{ ++ int err; ++ aufs_bindex_t bindex, bbot; ++ struct au_xino_do_set_br args; + struct inode *inode; -+ vfs_writef_t writef; + + SiMustWriteLock(sb); + -+ err = -ENOMEM; + bbot = au_sbbot(sb); -+ fpair = kcalloc(bbot + 1, sizeof(*fpair), GFP_NOFS); -+ if (unlikely(!fpair)) -+ goto out; -+ + inode = d_inode(sb->s_root); -+ ino = AUFS_ROOT_INO; -+ writef = au_sbi(sb)->si_xwrite; -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) { -+ bshared = is_sb_shared(sb, bindex, bindex - 1); -+ if (bshared >= 0) { -+ /* shared xino */ -+ *p = fpair[bshared]; -+ get_file(p->new); -+ } -+ -+ if (!p->new) { -+ /* new xino */ -+ br = au_sbr(sb, bindex); -+ p->old = br->br_xino.xi_file; -+ p->new = au_xino_create2(base, br->br_xino.xi_file); -+ err = PTR_ERR(p->new); -+ if (IS_ERR(p->new)) { -+ p->new = NULL; -+ goto out_pair; -+ } -+ } -+ -+ err = au_xino_do_write(writef, p->new, -+ au_h_iptr(inode, bindex)->i_ino, ino); ++ args.writef = au_sbi(sb)->si_xwrite; ++ for (bindex = 0; bindex <= bbot; bindex++) { ++ args.h_ino = au_h_iptr(inode, bindex)->i_ino; ++ args.br = au_sbr(sb, bindex); ++ args.bshared = is_sb_shared(sb, bindex, bindex - 1); ++ err = au_xino_do_set_br(sb, path, &args); + if (unlikely(err)) -+ goto out_pair; -+ } -+ -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) { -+ br = au_sbr(sb, bindex); -+ if (br->br_xino.xi_file) -+ fput(br->br_xino.xi_file); -+ get_file(p->new); -+ br->br_xino.xi_file = p->new; -+ } -+ -+out_pair: -+ for (bindex = 0, p = fpair; bindex <= bbot; bindex++, p++) -+ if (p->new) -+ fput(p->new); -+ else + break; -+ kfree(fpair); -+out: ++ } ++ ++ AuTraceErr(err); + return err; +} + @@ -36526,32 +36635,38 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + au_xigen_clr(sb); + xino_clear_xib(sb); + xino_clear_br(sb); ++ dbgaufs_brs_del(sb, 0); ++ au_xino_brid_set(sb, -1); + sbinfo = au_sbi(sb); + /* lvalue, do not call au_mntflags() */ + au_opt_clr(sbinfo->si_mntflags, XINO); +} + -+int au_xino_set(struct super_block *sb, struct au_opt_xino *xino, int remount) ++int au_xino_set(struct super_block *sb, struct au_opt_xino *xiopt, int remount) +{ + int err, skip; -+ struct dentry *parent, *cur_parent; ++ struct dentry *dentry, *parent, *cur_dentry, *cur_parent; + struct qstr *dname, *cur_name; + struct file *cur_xino; -+ struct inode *dir; + struct au_sbinfo *sbinfo; ++ struct path *path, *cur_path; + + SiMustWriteLock(sb); + + err = 0; + sbinfo = au_sbi(sb); -+ parent = dget_parent(xino->file->f_path.dentry); ++ path = &xiopt->file->f_path; ++ dentry = path->dentry; ++ parent = dget_parent(dentry); + if (remount) { + skip = 0; -+ dname = &xino->file->f_path.dentry->d_name; + cur_xino = sbinfo->si_xib; + if (cur_xino) { -+ cur_parent = dget_parent(cur_xino->f_path.dentry); -+ cur_name = &cur_xino->f_path.dentry->d_name; ++ cur_path = &cur_xino->f_path; ++ cur_dentry = cur_path->dentry; ++ cur_parent = dget_parent(cur_dentry); ++ cur_name = &cur_dentry->d_name; ++ dname = &dentry->d_name; + skip = (cur_parent == parent + && au_qstreq(dname, cur_name)); + dput(cur_parent); @@ -36561,30 +36676,26 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + } + + au_opt_set(sbinfo->si_mntflags, XINO); -+ dir = d_inode(parent); -+ inode_lock_nested(dir, AuLsc_I_PARENT); -+ /* mnt_want_write() is unnecessary here */ -+ err = au_xino_set_xib(sb, xino->file); ++ err = au_xino_set_xib(sb, path); ++ /* si_x{read,write} are set */ + if (!err) -+ err = au_xigen_set(sb, xino->file); -+ if (!err) -+ err = au_xino_set_br(sb, xino->file); -+ inode_unlock(dir); ++ err = au_xigen_set(sb, path); + if (!err) ++ err = au_xino_set_br(sb, path); ++ if (!err) { ++ dbgaufs_brs_add(sb, 0, /*topdown*/1); + goto out; /* success */ ++ } + + /* reset all */ -+ AuIOErr("failed creating xino(%d).\n", err); -+ au_xigen_clr(sb); -+ xino_clear_xib(sb); ++ AuIOErr("failed setting xino(%d).\n", err); ++ au_xino_clr(sb); + +out: + dput(parent); + return err; +} + -+/* ---------------------------------------------------------------------- */ -+ +/* + * create a xinofile at the default place/path. + */ @@ -36647,6 +36758,248 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c + +/* ---------------------------------------------------------------------- */ + ++/* ++ * initialize the xinofile for the specified branch @br ++ * at the place/path where @base_file indicates. ++ * test whether another branch is on the same filesystem or not, ++ * if found then share the xinofile with another branch. ++ */ ++int au_xino_init_br(struct super_block *sb, struct au_branch *br, ino_t h_ino, ++ struct path *base) ++{ ++ int err; ++ struct au_xino_do_set_br args = { ++ .h_ino = h_ino, ++ .br = br ++ }; ++ ++ args.writef = au_sbi(sb)->si_xwrite; ++ args.bshared = sbr_find_shared(sb, /*btop*/0, au_sbbot(sb), ++ au_br_sb(br)); ++ err = au_xino_do_set_br(sb, base, &args); ++ if (unlikely(err)) ++ au_xino_put(br); ++ ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++/* ++ * get an unused inode number from bitmap ++ */ ++ino_t au_xino_new_ino(struct super_block *sb) ++{ ++ ino_t ino; ++ unsigned long *p, pindex, ul, pend; ++ struct au_sbinfo *sbinfo; ++ struct file *file; ++ int free_bit, err; ++ ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ return iunique(sb, AUFS_FIRST_INO); ++ ++ sbinfo = au_sbi(sb); ++ mutex_lock(&sbinfo->si_xib_mtx); ++ p = sbinfo->si_xib_buf; ++ free_bit = sbinfo->si_xib_next_bit; ++ if (free_bit < page_bits && !test_bit(free_bit, p)) ++ goto out; /* success */ ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ ++ pindex = sbinfo->si_xib_last_pindex; ++ for (ul = pindex - 1; ul < ULONG_MAX; ul--) { ++ err = xib_pindex(sb, ul); ++ if (unlikely(err)) ++ goto out_err; ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ } ++ ++ file = sbinfo->si_xib; ++ pend = vfsub_f_size_read(file) / PAGE_SIZE; ++ for (ul = pindex + 1; ul <= pend; ul++) { ++ err = xib_pindex(sb, ul); ++ if (unlikely(err)) ++ goto out_err; ++ free_bit = find_first_zero_bit(p, page_bits); ++ if (free_bit < page_bits) ++ goto out; /* success */ ++ } ++ BUG(); ++ ++out: ++ set_bit(free_bit, p); ++ sbinfo->si_xib_next_bit = free_bit + 1; ++ pindex = sbinfo->si_xib_last_pindex; ++ mutex_unlock(&sbinfo->si_xib_mtx); ++ ino = xib_calc_ino(pindex, free_bit); ++ AuDbg("i%lu\n", (unsigned long)ino); ++ return ino; ++out_err: ++ mutex_unlock(&sbinfo->si_xib_mtx); ++ AuDbg("i0\n"); ++ return 0; ++} ++ ++/* for s_op->delete_inode() */ ++void au_xino_delete_inode(struct inode *inode, const int unlinked) ++{ ++ int err; ++ unsigned int mnt_flags; ++ aufs_bindex_t bindex, bbot, bi; ++ unsigned char try_trunc; ++ struct au_iinfo *iinfo; ++ struct super_block *sb; ++ struct au_hinode *hi; ++ struct inode *h_inode; ++ struct au_branch *br; ++ vfs_writef_t xwrite; ++ ++ AuDebugOn(au_is_bad_inode(inode)); ++ ++ sb = inode->i_sb; ++ mnt_flags = au_mntflags(sb); ++ if (!au_opt_test(mnt_flags, XINO) ++ || inode->i_ino == AUFS_ROOT_INO) ++ return; ++ ++ if (unlinked) { ++ au_xigen_inc(inode); ++ au_xib_clear_bit(inode); ++ } ++ ++ iinfo = au_ii(inode); ++ bindex = iinfo->ii_btop; ++ if (bindex < 0) ++ return; ++ ++ xwrite = au_sbi(sb)->si_xwrite; ++ try_trunc = !!au_opt_test(mnt_flags, TRUNC_XINO); ++ hi = au_hinode(iinfo, bindex); ++ bbot = iinfo->ii_bbot; ++ for (; bindex <= bbot; bindex++, hi++) { ++ h_inode = hi->hi_inode; ++ if (!h_inode ++ || (!unlinked && h_inode->i_nlink)) ++ continue; ++ ++ /* inode may not be revalidated */ ++ bi = au_br_index(sb, hi->hi_id); ++ if (bi < 0) ++ continue; ++ ++ br = au_sbr(sb, bi); ++ err = au_xino_do_write(xwrite, au_xino_file(br), ++ h_inode->i_ino, /*ino*/0); ++ if (!err && try_trunc ++ && au_test_fs_trunc_xino(au_br_sb(br))) ++ xino_try_trunc(sb, br); ++ } ++} ++ ++/* ---------------------------------------------------------------------- */ ++ ++static int au_xinondir_find(struct au_xino *xi, ino_t h_ino) ++{ ++ int found, total, i; ++ ++ found = -1; ++ total = xi->xi_nondir.total; ++ for (i = 0; i < total; i++) { ++ if (xi->xi_nondir.array[i] != h_ino) ++ continue; ++ found = i; ++ break; ++ } ++ ++ return found; ++} ++ ++static int au_xinondir_expand(struct au_xino *xi) ++{ ++ int err, sz; ++ ino_t *p; ++ ++ BUILD_BUG_ON(KMALLOC_MAX_SIZE > INT_MAX); ++ ++ err = -ENOMEM; ++ sz = xi->xi_nondir.total * sizeof(ino_t); ++ if (unlikely(sz > KMALLOC_MAX_SIZE / 2)) ++ goto out; ++ p = au_kzrealloc(xi->xi_nondir.array, sz, sz << 1, GFP_ATOMIC, ++ /*may_shrink*/0); ++ if (p) { ++ xi->xi_nondir.array = p; ++ xi->xi_nondir.total <<= 1; ++ AuDbg("xi_nondir.total %d\n", xi->xi_nondir.total); ++ err = 0; ++ } ++ ++out: ++ return err; ++} ++ ++void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, ++ ino_t h_ino, int idx) ++{ ++ struct au_xino *xi; ++ ++ AuDebugOn(!au_opt_test(au_mntflags(sb), XINO)); ++ xi = au_sbr(sb, bindex)->br_xino; ++ AuDebugOn(idx < 0 || xi->xi_nondir.total <= idx); ++ ++ spin_lock(&xi->xi_nondir.spin); ++ AuDebugOn(xi->xi_nondir.array[idx] != h_ino); ++ xi->xi_nondir.array[idx] = 0; ++ spin_unlock(&xi->xi_nondir.spin); ++ wake_up_all(&xi->xi_nondir.wqh); ++} ++ ++int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, ++ int *idx) ++{ ++ int err, found, empty; ++ struct au_xino *xi; ++ ++ err = 0; ++ *idx = -1; ++ if (!au_opt_test(au_mntflags(sb), XINO)) ++ goto out; /* no xino */ ++ ++ xi = au_sbr(sb, bindex)->br_xino; ++ ++again: ++ spin_lock(&xi->xi_nondir.spin); ++ found = au_xinondir_find(xi, h_ino); ++ if (found == -1) { ++ empty = au_xinondir_find(xi, /*h_ino*/0); ++ if (empty == -1) { ++ empty = xi->xi_nondir.total; ++ err = au_xinondir_expand(xi); ++ if (unlikely(err)) ++ goto out_unlock; ++ } ++ xi->xi_nondir.array[empty] = h_ino; ++ *idx = empty; ++ } else { ++ spin_unlock(&xi->xi_nondir.spin); ++ wait_event(xi->xi_nondir.wqh, ++ xi->xi_nondir.array[found] != h_ino); ++ goto again; ++ } ++ ++out_unlock: ++ spin_unlock(&xi->xi_nondir.spin); ++out: ++ return err; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +int au_xino_path(struct seq_file *seq, struct file *file) +{ + int err; @@ -36664,109 +37017,13 @@ diff -Naur null/fs/aufs/xino.c linux-4.15/fs/aufs/xino.c +out: + return err; +} -+ -+/* ---------------------------------------------------------------------- */ -+ -+void au_xinondir_leave(struct super_block *sb, aufs_bindex_t bindex, -+ ino_t h_ino, int idx) -+{ -+ struct au_xino_file *xino; -+ -+ AuDebugOn(!au_opt_test(au_mntflags(sb), XINO)); -+ xino = &au_sbr(sb, bindex)->br_xino; -+ AuDebugOn(idx < 0 || xino->xi_nondir.total <= idx); -+ -+ spin_lock(&xino->xi_nondir.spin); -+ AuDebugOn(xino->xi_nondir.array[idx] != h_ino); -+ xino->xi_nondir.array[idx] = 0; -+ spin_unlock(&xino->xi_nondir.spin); -+ wake_up_all(&xino->xi_nondir.wqh); -+} -+ -+static int au_xinondir_find(struct au_xino_file *xino, ino_t h_ino) -+{ -+ int found, total, i; -+ -+ found = -1; -+ total = xino->xi_nondir.total; -+ for (i = 0; i < total; i++) { -+ if (xino->xi_nondir.array[i] != h_ino) -+ continue; -+ found = i; -+ break; -+ } -+ -+ return found; -+} -+ -+static int au_xinondir_expand(struct au_xino_file *xino) -+{ -+ int err, sz; -+ ino_t *p; -+ -+ BUILD_BUG_ON(KMALLOC_MAX_SIZE > INT_MAX); -+ -+ err = -ENOMEM; -+ sz = xino->xi_nondir.total * sizeof(ino_t); -+ if (unlikely(sz > KMALLOC_MAX_SIZE / 2)) -+ goto out; -+ p = au_kzrealloc(xino->xi_nondir.array, sz, sz << 1, GFP_ATOMIC, -+ /*may_shrink*/0); -+ if (p) { -+ xino->xi_nondir.array = p; -+ xino->xi_nondir.total <<= 1; -+ AuDbg("xi_nondir.total %d\n", xino->xi_nondir.total); -+ err = 0; -+ } -+ -+out: -+ return err; -+} -+ -+int au_xinondir_enter(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, -+ int *idx) -+{ -+ int err, found, empty; -+ struct au_xino_file *xino; -+ -+ err = 0; -+ *idx = -1; -+ if (!au_opt_test(au_mntflags(sb), XINO)) -+ goto out; /* no xino */ -+ -+ xino = &au_sbr(sb, bindex)->br_xino; -+ -+again: -+ spin_lock(&xino->xi_nondir.spin); -+ found = au_xinondir_find(xino, h_ino); -+ if (found == -1) { -+ empty = au_xinondir_find(xino, /*h_ino*/0); -+ if (empty == -1) { -+ empty = xino->xi_nondir.total; -+ err = au_xinondir_expand(xino); -+ if (unlikely(err)) -+ goto out_unlock; -+ } -+ xino->xi_nondir.array[empty] = h_ino; -+ *idx = empty; -+ } else { -+ spin_unlock(&xino->xi_nondir.spin); -+ wait_event(xino->xi_nondir.wqh, -+ xino->xi_nondir.array[found] != h_ino); -+ goto again; -+ } -+ -+out_unlock: -+ spin_unlock(&xino->xi_nondir.spin); -+out: -+ return err; -+} -diff -Naur null/include/uapi/linux/aufs_type.h linux-4.15/include/uapi/linux/aufs_type.h +diff -Naur null/include/uapi/linux/aufs_type.h linux-4.17/include/uapi/linux/aufs_type.h --- /dev/null -+++ linux-4.15/include/uapi/linux/aufs_type.h 2018-02-25 02:38:09.207738436 +0100 -@@ -0,0 +1,447 @@ ++++ linux-4.17/include/uapi/linux/aufs_type.h 2018-07-25 15:11:05.133257096 +0200 +@@ -0,0 +1,448 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* -+ * Copyright (C) 2005-2017 Junjiro R. Okajima ++ * Copyright (C) 2005-2018 Junjiro R. Okajima + * + * This program, aufs is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by @@ -36806,7 +37063,7 @@ diff -Naur null/include/uapi/linux/aufs_type.h linux-4.15/include/uapi/linux/auf + +#include + -+#define AUFS_VERSION "4.15-20180219" ++#define AUFS_VERSION "4.17-20180723" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') diff --git a/talimatname/genel/k/kernel/config b/talimatname/genel/k/kernel/config index b838acbb2..bbbb9e919 100644 --- a/talimatname/genel/k/kernel/config +++ b/talimatname/genel/k/kernel/config @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.15.4-1 Kernel Configuration +# Linux/x86 4.17.14-1 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y @@ -26,6 +26,7 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_ARCH_HAS_FILTER_PGPROT=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y @@ -42,7 +43,6 @@ CONFIG_X86_64_SMP=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_FIX_EARLYCON_MEM=y CONFIG_PGTABLE_LEVELS=4 -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y CONFIG_THREAD_INFO_IN_TASK=y @@ -54,7 +54,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="-milis" -CONFIG_LOCALVERSION_AUTO=y +# CONFIG_LOCALVERSION_AUTO is not set CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_BZIP2=y CONFIG_HAVE_KERNEL_LZMA=y @@ -95,7 +95,6 @@ CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y CONFIG_GENERIC_IRQ_RESERVATION_MODE=y -# CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set @@ -209,7 +208,6 @@ CONFIG_UID16=y CONFIG_MULTIUSER=y CONFIG_SGETMASK_SYSCALL=y CONFIG_SYSFS_SYSCALL=y -# CONFIG_SYSCTL_SYSCALL is not set CONFIG_FHANDLE=y CONFIG_POSIX_TIMERS=y CONFIG_PRINTK=y @@ -228,7 +226,6 @@ CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y CONFIG_MEMBARRIER=y -# CONFIG_CHECKPOINT_RESTORE is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y @@ -236,9 +233,9 @@ CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_USERFAULTFD=y +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y -# CONFIG_PC104 is not set # # Kernel Performance Events And Counters @@ -247,7 +244,6 @@ CONFIG_PERF_EVENTS=y # CONFIG_DEBUG_PERF_USE_VMALLOC is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y -# CONFIG_SLUB_MEMCG_SYSFS_ON is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y @@ -269,8 +265,6 @@ CONFIG_JUMP_LABEL=y # CONFIG_STATIC_KEYS_SELFTEST is not set CONFIG_OPTPROBES=y CONFIG_KPROBES_ON_FTRACE=y -# CONFIG_UPROBES is not set -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_KRETPROBES=y @@ -280,12 +274,14 @@ CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_KPROBES_ON_FTRACE=y +CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y CONFIG_HAVE_NMI=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_ARCH_HAS_FORTIFY_SOURCE=y CONFIG_ARCH_HAS_SET_MEMORY=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y @@ -310,11 +306,10 @@ CONFIG_SECCOMP_FILTER=y CONFIG_HAVE_GCC_PLUGINS=y # CONFIG_GCC_PLUGINS is not set CONFIG_HAVE_CC_STACKPROTECTOR=y -CONFIG_CC_STACKPROTECTOR=y # CONFIG_CC_STACKPROTECTOR_NONE is not set CONFIG_CC_STACKPROTECTOR_REGULAR=y # CONFIG_CC_STACKPROTECTOR_STRONG is not set -CONFIG_THIN_ARCHIVES=y +# CONFIG_CC_STACKPROTECTOR_AUTO is not set CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y @@ -335,15 +330,11 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8 CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_STACK_VALIDATION=y -# CONFIG_HAVE_ARCH_HASH is not set -# CONFIG_ISA_BUS_API is not set +CONFIG_ISA_BUS_API=y CONFIG_OLD_SIGSUSPEND3=y CONFIG_COMPAT_OLD_SIGACTION=y -# CONFIG_CPU_NO_EFFICIENT_FFS is not set CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set -# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y CONFIG_STRICT_KERNEL_RWX=y CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y @@ -356,7 +347,6 @@ CONFIG_ARCH_HAS_REFCOUNT=y # # CONFIG_GCOV_KERNEL is not set CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -441,6 +431,8 @@ CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_QUEUED_SPINLOCKS=y CONFIG_ARCH_USE_QUEUED_RWLOCKS=y CONFIG_QUEUED_RWLOCKS=y +CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y +CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y CONFIG_FREEZER=y # @@ -449,7 +441,6 @@ CONFIG_FREEZER=y CONFIG_ZONE_DMA=y CONFIG_SMP=y CONFIG_X86_FEATURE_NAMES=y -CONFIG_X86_FAST_FEATURE_TESTS=y CONFIG_X86_X2APIC=y CONFIG_X86_MPPARSE=y # CONFIG_GOLDFISH is not set @@ -480,6 +471,7 @@ CONFIG_KVM_GUEST=y # CONFIG_KVM_DEBUG_FS is not set CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_PARAVIRT_CLOCK=y +CONFIG_JAILHOUSE_GUEST=y CONFIG_NO_BOOTMEM=y # CONFIG_MK8 is not set # CONFIG_MPSC is not set @@ -505,6 +497,9 @@ CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y CONFIG_SWIOTLB=y CONFIG_IOMMU_HELPER=y # CONFIG_MAXSMP is not set +CONFIG_NR_CPUS_RANGE_BEGIN=2 +CONFIG_NR_CPUS_RANGE_END=512 +CONFIG_NR_CPUS_DEFAULT=64 CONFIG_NR_CPUS=128 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y @@ -531,7 +526,6 @@ CONFIG_PERF_EVENTS_INTEL_UNCORE=y CONFIG_PERF_EVENTS_INTEL_RAPL=m CONFIG_PERF_EVENTS_INTEL_CSTATE=m CONFIG_PERF_EVENTS_AMD_POWER=m -# CONFIG_VM86 is not set CONFIG_X86_16BIT=y CONFIG_X86_ESPFIX64=y CONFIG_X86_VSYSCALL_EMULATION=y @@ -613,7 +607,6 @@ CONFIG_ZSMALLOC=y # CONFIG_PGTABLE_MAPPING is not set # CONFIG_ZSMALLOC_STAT is not set CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT=y # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set # CONFIG_IDLE_PAGE_TRACKING is not set CONFIG_ARCH_HAS_ZONE_DEVICE=y @@ -642,7 +635,7 @@ CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_ARCH_RANDOM=y CONFIG_X86_SMAP=y CONFIG_X86_INTEL_UMIP=y -CONFIG_X86_INTEL_MPX=y +# CONFIG_X86_INTEL_MPX is not set CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y CONFIG_EFI=y CONFIG_EFI_STUB=y @@ -656,6 +649,7 @@ CONFIG_HZ=1000 CONFIG_SCHED_HRTICK=y CONFIG_KEXEC=y CONFIG_KEXEC_FILE=y +CONFIG_ARCH_HAS_KEXEC_PURGATORY=y # CONFIG_KEXEC_VERIFY_SIG is not set CONFIG_CRASH_DUMP=y CONFIG_KEXEC_JUMP=y @@ -664,13 +658,13 @@ CONFIG_RELOCATABLE=y CONFIG_RANDOMIZE_BASE=y CONFIG_X86_NEED_RELOCS=y CONFIG_PHYSICAL_ALIGN=0x1000000 +CONFIG_DYNAMIC_MEMORY_LAYOUT=y CONFIG_RANDOMIZE_MEMORY=y CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa CONFIG_HOTPLUG_CPU=y # CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set # CONFIG_DEBUG_HOTPLUG_CPU0 is not set # CONFIG_COMPAT_VDSO is not set -# CONFIG_LEGACY_VSYSCALL_NATIVE is not set CONFIG_LEGACY_VSYSCALL_EMULATE=y # CONFIG_LEGACY_VSYSCALL_NONE is not set # CONFIG_CMDLINE_BOOL is not set @@ -712,6 +706,7 @@ CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y # CONFIG_ACPI_DEBUGGER is not set +CONFIG_ACPI_SPCR_TABLE=y CONFIG_ACPI_LPIT=y CONFIG_ACPI_SLEEP=y # CONFIG_ACPI_PROCFS_POWER is not set @@ -722,6 +717,7 @@ CONFIG_ACPI_BATTERY=m CONFIG_ACPI_BUTTON=m CONFIG_ACPI_VIDEO=m CONFIG_ACPI_FAN=m +CONFIG_ACPI_TAD=m CONFIG_ACPI_DOCK=y CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_ACPI_PROCESSOR_CSTATE=y @@ -733,12 +729,10 @@ CONFIG_ACPI_HOTPLUG_CPU=y CONFIG_ACPI_PROCESSOR_AGGREGATOR=m CONFIG_ACPI_THERMAL=m CONFIG_ACPI_NUMA=y -# CONFIG_ACPI_CUSTOM_DSDT is not set CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y CONFIG_ACPI_TABLE_UPGRADE=y # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_PCI_SLOT=y -CONFIG_X86_PM_TIMER=y CONFIG_ACPI_CONTAINER=y CONFIG_ACPI_HOTPLUG_MEMORY=y CONFIG_ACPI_HOTPLUG_IOAPIC=y @@ -746,7 +740,6 @@ CONFIG_ACPI_SBS=m CONFIG_ACPI_HED=y CONFIG_ACPI_CUSTOM_METHOD=m CONFIG_ACPI_BGRT=y -# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set CONFIG_ACPI_NFIT=m CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y @@ -765,6 +758,7 @@ CONFIG_PMIC_OPREGION=y CONFIG_CHT_DC_TI_PMIC_OPREGION=y CONFIG_ACPI_CONFIGFS=m CONFIG_TPS68470_PMIC_OPREGION=y +CONFIG_X86_PM_TIMER=y CONFIG_SFI=y # @@ -810,7 +804,6 @@ CONFIG_X86_SPEEDSTEP_LIB=m CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y -# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_INTEL_IDLE=y # @@ -821,6 +814,7 @@ CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y CONFIG_PCI_XEN=y CONFIG_PCI_DOMAINS=y +CONFIG_MMCONF_FAM10H=y CONFIG_PCIEPORTBUS=y CONFIG_HOTPLUG_PCI_PCIE=y CONFIG_PCIEAER=y @@ -858,6 +852,10 @@ CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m CONFIG_HOTPLUG_PCI_SHPC=m +# +# Cadence PCIe controllers support +# + # # DesignWare PCI Core Support # @@ -924,7 +922,6 @@ CONFIG_COMPAT_BINFMT_ELF=y CONFIG_ELFCORE=y CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y CONFIG_BINFMT_SCRIPT=y -# CONFIG_HAVE_AOUT is not set CONFIG_BINFMT_MISC=y CONFIG_COREDUMP=y CONFIG_IA32_EMULATION=y @@ -973,6 +970,7 @@ CONFIG_NET_IPGRE_DEMUX=m CONFIG_NET_IP_TUNNEL=m CONFIG_NET_IPGRE=m # CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE_COMMON=y CONFIG_IP_MROUTE=y CONFIG_IP_MROUTE_MULTIPLE_TABLES=y CONFIG_IP_PIMSM_V1=y @@ -1062,12 +1060,15 @@ CONFIG_BRIDGE_NETFILTER=m # CONFIG_NETFILTER_INGRESS=y CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_FAMILY_BRIDGE=y +CONFIG_NETFILTER_FAMILY_ARP=y CONFIG_NETFILTER_NETLINK_ACCT=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NF_CONNTRACK=m CONFIG_NF_LOG_COMMON=m CONFIG_NF_LOG_NETDEV=m +CONFIG_NETFILTER_CONNCOUNT=m CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_SECMARK=y CONFIG_NF_CONNTRACK_ZONES=y @@ -1108,13 +1109,14 @@ CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_REDIRECT=m CONFIG_NETFILTER_SYNPROXY=m CONFIG_NF_TABLES=m -CONFIG_NF_TABLES_INET=m -CONFIG_NF_TABLES_NETDEV=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y CONFIG_NFT_EXTHDR=m CONFIG_NFT_META=m CONFIG_NFT_RT=m # CONFIG_NFT_NUMGEN is not set CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m # CONFIG_NFT_SET_RBTREE is not set # CONFIG_NFT_SET_HASH is not set # CONFIG_NFT_SET_BITMAP is not set @@ -1134,6 +1136,8 @@ CONFIG_NFT_HASH=m CONFIG_NF_DUP_NETDEV=m CONFIG_NFT_DUP_NETDEV=m CONFIG_NFT_FWD_NETDEV=m +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m CONFIG_NETFILTER_XTABLES=m # @@ -1289,12 +1293,13 @@ CONFIG_IP_VS_PE_SIP=m CONFIG_NF_DEFRAG_IPV4=m CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_SOCKET_IPV4=m -CONFIG_NF_TABLES_IPV4=m +CONFIG_NF_TABLES_IPV4=y CONFIG_NFT_CHAIN_ROUTE_IPV4=m CONFIG_NFT_REJECT_IPV4=m CONFIG_NFT_DUP_IPV4=m # CONFIG_NFT_FIB_IPV4 is not set -CONFIG_NF_TABLES_ARP=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_FLOW_TABLE_IPV4=m CONFIG_NF_DUP_IPV4=m CONFIG_NF_LOG_ARP=m CONFIG_NF_LOG_IPV4=m @@ -1336,19 +1341,20 @@ CONFIG_IP_NF_ARP_MANGLE=m CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m CONFIG_NF_SOCKET_IPV6=m -CONFIG_NF_TABLES_IPV6=m +CONFIG_NF_TABLES_IPV6=y CONFIG_NFT_CHAIN_ROUTE_IPV6=m +CONFIG_NFT_CHAIN_NAT_IPV6=m +CONFIG_NFT_MASQ_IPV6=m +CONFIG_NFT_REDIR_IPV6=m CONFIG_NFT_REJECT_IPV6=m CONFIG_NFT_DUP_IPV6=m # CONFIG_NFT_FIB_IPV6 is not set +CONFIG_NF_FLOW_TABLE_IPV6=m CONFIG_NF_DUP_IPV6=m CONFIG_NF_REJECT_IPV6=m CONFIG_NF_LOG_IPV6=m CONFIG_NF_NAT_IPV6=m -CONFIG_NFT_CHAIN_NAT_IPV6=m CONFIG_NF_NAT_MASQUERADE_IPV6=m -CONFIG_NFT_MASQ_IPV6=m -CONFIG_NFT_REDIR_IPV6=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1359,6 +1365,7 @@ CONFIG_IP6_NF_MATCH_IPV6HEADER=m CONFIG_IP6_NF_MATCH_MH=m CONFIG_IP6_NF_MATCH_RPFILTER=m CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m CONFIG_IP6_NF_TARGET_HL=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_REJECT=m @@ -1369,7 +1376,7 @@ CONFIG_IP6_NF_SECURITY=m CONFIG_IP6_NF_NAT=m CONFIG_IP6_NF_TARGET_MASQUERADE=m CONFIG_IP6_NF_TARGET_NPT=m -CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NF_TABLES_BRIDGE=y CONFIG_NFT_BRIDGE_META=m CONFIG_NFT_BRIDGE_REJECT=m CONFIG_NF_LOG_BRIDGE=m @@ -1409,9 +1416,7 @@ CONFIG_IP_DCCP_TFRC_LIB=y # DCCP Kernel Hacking # # CONFIG_IP_DCCP_DEBUG is not set -CONFIG_NET_DCCPPROBE=m CONFIG_IP_SCTP=m -CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5 is not set CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1=y @@ -1440,6 +1445,7 @@ CONFIG_BRIDGE_IGMP_SNOOPING=y CONFIG_BRIDGE_VLAN_FILTERING=y CONFIG_HAVE_NET_DSA=y CONFIG_NET_DSA=m +CONFIG_NET_DSA_LEGACY=y CONFIG_NET_DSA_TAG_BRCM=y CONFIG_NET_DSA_TAG_BRCM_PREPEND=y CONFIG_NET_DSA_TAG_DSA=y @@ -1454,7 +1460,6 @@ CONFIG_VLAN_8021Q_MVRP=y # CONFIG_DECNET is not set CONFIG_LLC=m CONFIG_LLC2=m -# CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set @@ -1600,7 +1605,6 @@ CONFIG_NET_FLOW_LIMIT=y # Network testing # CONFIG_NET_PKTGEN=m -CONFIG_NET_TCPPROBE=m CONFIG_NET_DROP_MONITOR=m CONFIG_HAMRADIO=y @@ -1699,6 +1703,7 @@ CONFIG_BT_BCM=m CONFIG_BT_RTL=m CONFIG_BT_QCA=m CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y CONFIG_BT_HCIBTUSB_BCM=y CONFIG_BT_HCIBTUSB_RTL=y CONFIG_BT_HCIBTSDIO=m @@ -1717,12 +1722,12 @@ CONFIG_BT_HCIBFUSB=m CONFIG_BT_HCIDTL1=m CONFIG_BT_HCIBT3C=m CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m CONFIG_BT_HCIVHCI=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m CONFIG_BT_WILINK=m +CONFIG_BT_HCIRSI=m CONFIG_AF_RXRPC=m CONFIG_AF_RXRPC_IPV6=y CONFIG_AF_RXRPC_INJECT_LOSS=y @@ -1756,7 +1761,6 @@ CONFIG_MAC80211=m CONFIG_MAC80211_HAS_RC=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_RC_MINSTREL_HT=y -# CONFIG_MAC80211_RC_MINSTREL_VHT is not set CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y @@ -1839,8 +1843,7 @@ CONFIG_DEVTMPFS=y CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -CONFIG_FIRMWARE_IN_KERNEL=y -CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin intel-ucode/06-03-02 intel-ucode/06-06-05 intel-ucode/06-7a-01 intel-ucode/06-08-01 intel-ucode/06-0a-01 intel-ucode/06-0f-02 intel-ucode/06-16-01 intel-ucode/06-1c-02 intel-ucode/06-25-05 intel-ucode/06-3a-09 intel-ucode/06-3f-02 intel-ucode/0f-00-0a intel-ucode/0f-02-09 intel-ucode/0f-04-04 intel-ucode/0f-06-04 intel-ucode/06-05-00 intel-ucode/06-06-0a intel-ucode/06-08-03 intel-ucode/06-0b-01 intel-ucode/06-0f-06 intel-ucode/06-17-06 intel-ucode/06-1c-0a intel-ucode/06-26-01 intel-ucode/06-3c-03 intel-ucode/06-3f-04 intel-ucode/0f-01-02 intel-ucode/0f-03-02 intel-ucode/0f-04-07 intel-ucode/0f-06-05 intel-ucode/06-05-01 intel-ucode/06-06-0d intel-ucode/06-08-06 intel-ucode/06-0b-04 intel-ucode/06-0f-07 intel-ucode/06-17-07 intel-ucode/06-1d-01 intel-ucode/06-2a-07 intel-ucode/06-3d-04 intel-ucode/06-45-01 intel-ucode/0f-02-04 intel-ucode/0f-03-03 intel-ucode/0f-04-08 intel-ucode/0f-06-08 intel-ucode/06-8e-0a intel-ucode/06-8e-09 intel-ucode/06-9e-09 intel-ucode/06-05-02 intel-ucode/06-07-01 intel-ucode/06-08-0a intel-ucode/06-0d-06 intel-ucode/06-0f-0a intel-ucode/06-17-0a intel-ucode/06-2d-06 intel-ucode/06-3e-04 intel-ucode/06-46-01 intel-ucode/0f-02-05 intel-ucode/0f-03-04 intel-ucode/0f-04-09 intel-ucode/06-05-03 intel-ucode/06-07-02 intel-ucode/06-09-05 intel-ucode/06-9e-0a intel-ucode/06-9e-0b intel-ucode/06-0e-08 intel-ucode/06-0f-0b intel-ucode/06-1a-04 intel-ucode/06-1e-05 intel-ucode/06-2d-07 intel-ucode/06-3e-06 intel-ucode/06-47-01 intel-ucode/06-55-04 intel-ucode/06-56-02 intel-ucode/06-56-03 intel-ucode/06-56-04 intel-ucode/0f-02-06 intel-ucode/0f-04-01 intel-ucode/0f-04-0a intel-ucode/06-5c-09 intel-ucode/06-5e-03 intel-ucode/06-06-00 intel-ucode/06-07-03 intel-ucode/06-0a-00 intel-ucode/06-0e-0c intel-ucode/06-0f-0d intel-ucode/06-1a-05 intel-ucode/06-25-02 intel-ucode/06-2f-02 intel-ucode/06-3e-07 intel-ucode/0f-00-07 intel-ucode/0f-02-07 intel-ucode/0f-04-03 intel-ucode/0f-06-02" +CONFIG_EXTRA_FIRMWARE="amd-ucode/microcode_amd.bin amd-ucode/microcode_amd_fam15h.bin amd-ucode/microcode_amd_fam16h.bin amd-ucode/microcode_amd_fam17h.bin intel-ucode/06-03-02 intel-ucode/06-06-05 intel-ucode/06-08-01 intel-ucode/06-0a-01 intel-ucode/06-0f-02 intel-ucode/06-16-01 intel-ucode/06-1c-02 intel-ucode/06-26-01 intel-ucode/06-3c-03 intel-ucode/06-3f-04 intel-ucode/06-55-04 intel-ucode/06-7a-01 intel-ucode/0f-00-07 intel-ucode/0f-02-07 intel-ucode/0f-04-03 intel-ucode/0f-06-02 intel-ucode/06-05-00 intel-ucode/06-06-0a intel-ucode/06-08-03 intel-ucode/06-0b-01 intel-ucode/06-0f-06 intel-ucode/06-17-06 intel-ucode/06-1c-0a intel-ucode/06-2a-07 intel-ucode/06-2c-02 intel-ucode/06-3d-04 intel-ucode/06-45-01 intel-ucode/06-56-02 intel-ucode/06-8e-09 intel-ucode/0f-00-0a intel-ucode/0f-02-09 intel-ucode/0f-04-04 intel-ucode/0f-06-04 intel-ucode/06-05-01 intel-ucode/06-06-0d intel-ucode/06-08-06 intel-ucode/06-0b-04 intel-ucode/06-0f-07 intel-ucode/06-17-07 intel-ucode/06-1d-01 intel-ucode/06-2d-06 intel-ucode/06-3e-04 intel-ucode/06-46-01 intel-ucode/06-56-03 intel-ucode/06-8e-0a intel-ucode/0f-01-02 intel-ucode/0f-03-02 intel-ucode/0f-04-07 intel-ucode/0f-06-05 intel-ucode/06-05-02 intel-ucode/06-07-01 intel-ucode/06-08-0a intel-ucode/06-0d-06 intel-ucode/06-0f-0a intel-ucode/06-17-0a intel-ucode/06-1e-05 intel-ucode/06-2d-07 intel-ucode/06-2e-06 intel-ucode/06-3e-06 intel-ucode/06-47-01 intel-ucode/06-56-04 intel-ucode/06-9e-09 intel-ucode/0f-02-04 intel-ucode/0f-03-03 intel-ucode/0f-04-08 intel-ucode/0f-06-08 intel-ucode/06-05-03 intel-ucode/06-07-02 intel-ucode/06-09-05 intel-ucode/06-0e-08 intel-ucode/06-0f-0b intel-ucode/06-1a-04 intel-ucode/06-25-02 intel-ucode/06-2f-02 intel-ucode/06-3e-07 intel-ucode/06-4e-03 intel-ucode/06-5c-09 intel-ucode/06-5c-0a intel-ucode/06-5c-02 intel-ucode/06-9e-0a intel-ucode/0f-02-05 intel-ucode/0f-03-04 intel-ucode/0f-04-09 intel-ucode/06-06-00 intel-ucode/06-07-03 intel-ucode/06-0a-00 intel-ucode/06-0e-0c intel-ucode/06-0f-0d intel-ucode/06-1a-05 intel-ucode/06-25-05 intel-ucode/06-3a-09 intel-ucode/06-3f-02 intel-ucode/06-5e-03 intel-ucode/06-5f-01 intel-ucode/06-9e-0b intel-ucode/0f-02-06 intel-ucode/0f-04-01 intel-ucode/0f-04-0a" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" CONFIG_FW_LOADER_USER_HELPER=y # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set @@ -1852,7 +1855,6 @@ CONFIG_DEV_COREDUMP=y # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set CONFIG_SYS_HYPERVISOR=y -# CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_CPU_VULNERABILITIES=y CONFIG_REGMAP=y @@ -1860,6 +1862,7 @@ CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_IRQ=y +CONFIG_REGMAP_SOUNDWIRE=m CONFIG_DMA_SHARED_BUFFER=y # CONFIG_DMA_FENCE_TRACE is not set @@ -1908,13 +1911,8 @@ CONFIG_MTD_GEN_PROBE=m CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y -# CONFIG_MTD_CFI_I4 is not set -# CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=m CONFIG_MTD_CFI_AMDSTD=m CONFIG_MTD_CFI_STAA=m @@ -1963,8 +1961,8 @@ CONFIG_MTD_BLOCK2MTD=m # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set -# CONFIG_MTD_NAND is not set # CONFIG_MTD_ONENAND is not set +# CONFIG_MTD_NAND is not set # # LPDDR & LPDDR2 PCM memory drivers @@ -1986,7 +1984,6 @@ CONFIG_PARPORT_SERIAL=m # CONFIG_PARPORT_PC_FIFO is not set # CONFIG_PARPORT_PC_SUPERIO is not set CONFIG_PARPORT_PC_PCMCIA=m -# CONFIG_PARPORT_GSC is not set CONFIG_PARPORT_AX88796=m CONFIG_PARPORT_1284=y CONFIG_PARPORT_NOT_PC=y @@ -2007,7 +2004,6 @@ CONFIG_ZRAM=m CONFIG_ZRAM_WRITEBACK=y CONFIG_BLK_DEV_DAC960=m # CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 CONFIG_BLK_DEV_CRYPTOLOOP=m @@ -2074,6 +2070,7 @@ CONFIG_USB_SWITCH_FSA9480=m # CONFIG_LATTICE_ECP3_CONFIG is not set # CONFIG_SRAM is not set CONFIG_PCI_ENDPOINT_TEST=m +CONFIG_MISC_RTSX=m CONFIG_C2PORT=m CONFIG_C2PORT_DURAMAR_2150=m @@ -2149,9 +2146,8 @@ CONFIG_VHOST_RING=m CONFIG_GENWQE=m CONFIG_GENWQE_PLATFORM_ERROR_RECOVERY=0 CONFIG_ECHO=m -# CONFIG_CXL_BASE is not set -# CONFIG_CXL_AFU_DRIVER_OPS is not set -# CONFIG_CXL_LIB is not set +CONFIG_MISC_RTSX_PCI=m +CONFIG_MISC_RTSX_USB=m CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -2256,11 +2252,6 @@ CONFIG_FCOE_FNIC=m CONFIG_SCSI_SNIC=m # CONFIG_SCSI_SNIC_DEBUG_FS is not set CONFIG_SCSI_DMX3191D=m -CONFIG_SCSI_EATA=m -# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set -# CONFIG_SCSI_EATA_LINKED_COMMANDS is not set -CONFIG_SCSI_EATA_MAX_TAGS=16 -CONFIG_SCSI_FUTURE_DOMAIN=m CONFIG_SCSI_GDTH=m CONFIG_SCSI_ISCI=m CONFIG_SCSI_IPS=m @@ -2299,7 +2290,6 @@ CONFIG_SCSI_VIRTIO=m CONFIG_SCSI_CHELSIO_FCOE=m CONFIG_SCSI_LOWLEVEL_PCMCIA=y CONFIG_PCMCIA_AHA152X=m -CONFIG_PCMCIA_FDOMAIN=m CONFIG_PCMCIA_QLOGIC=m CONFIG_PCMCIA_SYM53C500=m CONFIG_SCSI_DH=y @@ -2312,7 +2302,6 @@ CONFIG_SCSI_OSD_ULD=m CONFIG_SCSI_OSD_DPRINT_SENSE=0 # CONFIG_SCSI_OSD_DEBUG is not set CONFIG_ATA=m -# CONFIG_ATA_NONSTANDARD is not set CONFIG_ATA_VERBOSE_ERROR=y CONFIG_ATA_ACPI=y CONFIG_SATA_ZPODD=y @@ -2322,6 +2311,7 @@ CONFIG_SATA_PMP=y # Controllers with non-SFF native interface # CONFIG_SATA_AHCI=m +CONFIG_SATA_MOBILE_LPM_POLICY=0 CONFIG_SATA_AHCI_PLATFORM=m CONFIG_SATA_INIC162X=m CONFIG_SATA_ACARD_AHCI=m @@ -2428,6 +2418,7 @@ CONFIG_DM_BUFIO=m # CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set CONFIG_DM_BIO_PRISON=m CONFIG_DM_PERSISTENT_DATA=m +CONFIG_DM_UNSTRIPED=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m @@ -2571,6 +2562,7 @@ CONFIG_NET_DSA_MV88E6060=m # CONFIG_MICROCHIP_KSZ is not set CONFIG_NET_DSA_MV88E6XXX=m CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y +# CONFIG_NET_DSA_MV88E6XXX_PTP is not set CONFIG_NET_DSA_QCA8K=m CONFIG_NET_DSA_SMSC_LAN9303=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m @@ -2641,6 +2633,7 @@ CONFIG_CHELSIO_T4VF=m CONFIG_CHELSIO_LIB=m CONFIG_NET_VENDOR_CISCO=y CONFIG_ENIC=m +CONFIG_NET_VENDOR_CORTINA=y CONFIG_CX_ECAT=m CONFIG_DNET=m CONFIG_NET_VENDOR_DEC=y @@ -2690,6 +2683,7 @@ CONFIG_IXGBE_DCA=y CONFIG_IXGBEVF=m CONFIG_I40E=m CONFIG_I40EVF=m +CONFIG_ICE=m CONFIG_FM10K=m CONFIG_NET_VENDOR_I825XX=y CONFIG_JME=m @@ -2730,6 +2724,7 @@ CONFIG_NET_VENDOR_MICROCHIP=y CONFIG_ENC28J60=m # CONFIG_ENC28J60_WRITEVERIFY is not set CONFIG_ENCX24J600=m +CONFIG_LAN743X=m CONFIG_NET_VENDOR_MYRI=y CONFIG_MYRI10GE=m CONFIG_MYRI10GE_DCA=y @@ -2741,6 +2736,7 @@ CONFIG_NET_VENDOR_NETRONOME=y CONFIG_NFP=m # CONFIG_NFP_APP_FLOWER is not set # CONFIG_NFP_DEBUG is not set +CONFIG_NET_VENDOR_NI=y CONFIG_NET_VENDOR_8390=y CONFIG_PCMCIA_AXNET=m CONFIG_NE2K_PCI=m @@ -2804,8 +2800,8 @@ CONFIG_NET_VENDOR_SMSC=y CONFIG_PCMCIA_SMC91C92=m CONFIG_EPIC100=m CONFIG_SMSC911X=m -# CONFIG_SMSC911X_ARCH_HOOKS is not set CONFIG_SMSC9420=m +CONFIG_NET_VENDOR_SOCIONEXT=y CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=m # CONFIG_STMMAC_PLATFORM is not set @@ -2979,6 +2975,7 @@ CONFIG_ATH9K_PCOEM=y CONFIG_ATH9K_HTC=m # CONFIG_ATH9K_HTC_DEBUGFS is not set CONFIG_ATH9K_HWRNG=y +CONFIG_ATH9K_COMMON_SPECTRAL=y CONFIG_CARL9170=m CONFIG_CARL9170_LEDS=y # CONFIG_CARL9170_DEBUGFS is not set @@ -3000,6 +2997,7 @@ CONFIG_ATH10K_PCI=m # CONFIG_ATH10K_USB is not set # CONFIG_ATH10K_DEBUG is not set CONFIG_ATH10K_DEBUGFS=y +CONFIG_ATH10K_SPECTRAL=y # CONFIG_ATH10K_TRACING is not set CONFIG_WCN36XX=m # CONFIG_WCN36XX_DEBUGFS is not set @@ -3127,6 +3125,8 @@ CONFIG_MWIFIEX_USB=m CONFIG_MWL8K=m CONFIG_WLAN_VENDOR_MEDIATEK=y CONFIG_MT7601U=m +CONFIG_MT76_CORE=m +CONFIG_MT76x2E=m CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=m CONFIG_RT2400PCI=m @@ -3185,6 +3185,7 @@ CONFIG_RSI_91X=m # CONFIG_RSI_DEBUGFS is not set CONFIG_RSI_SDIO=m CONFIG_RSI_USB=m +CONFIG_RSI_COEX=y CONFIG_WLAN_VENDOR_ST=y CONFIG_CW1200=m CONFIG_CW1200_WLAN_SDIO=m @@ -3226,12 +3227,14 @@ CONFIG_IEEE802154_ATUSB=m CONFIG_IEEE802154_ADF7242=m CONFIG_IEEE802154_CA8210=m # CONFIG_IEEE802154_CA8210_DEBUGFS is not set +CONFIG_IEEE802154_MCR20A=m CONFIG_XEN_NETDEV_FRONTEND=m CONFIG_XEN_NETDEV_BACKEND=m CONFIG_VMXNET3=m CONFIG_FUJITSU_ES=m CONFIG_THUNDERBOLT_NET=m CONFIG_HYPERV_NET=m +CONFIG_NETDEVSIM=m CONFIG_ISDN=y CONFIG_ISDN_I4L=m CONFIG_ISDN_PPP=y @@ -3332,8 +3335,6 @@ CONFIG_ISDN_DIVAS_USERIDI=m CONFIG_ISDN_DIVAS_MAINT=m CONFIG_ISDN_DRV_GIGASET=m CONFIG_GIGASET_CAPI=y -# CONFIG_GIGASET_I4L is not set -# CONFIG_GIGASET_DUMMYLL is not set CONFIG_GIGASET_BASE=m CONFIG_GIGASET_M105=m CONFIG_GIGASET_M101=m @@ -3360,7 +3361,6 @@ CONFIG_MISDN_ISAR=m CONFIG_ISDN_HDLC=m CONFIG_NVM=y # CONFIG_NVM_DEBUG is not set -CONFIG_NVM_RRPC=m CONFIG_NVM_PBLK=m # @@ -3474,6 +3474,7 @@ CONFIG_JOYSTICK_XPAD_LEDS=y CONFIG_JOYSTICK_WALKERA0701=m CONFIG_JOYSTICK_PSXPAD_SPI=m # CONFIG_JOYSTICK_PSXPAD_SPI_FF is not set +# CONFIG_JOYSTICK_PXRC is not set CONFIG_INPUT_TABLET=y CONFIG_TABLET_USB_ACECAD=m CONFIG_TABLET_USB_AIPTEK=m @@ -3587,7 +3588,6 @@ CONFIG_INPUT_MMA8450=m CONFIG_INPUT_APANEL=m CONFIG_INPUT_GP2A=m # CONFIG_INPUT_GPIO_BEEPER is not set -# CONFIG_INPUT_GPIO_TILT_POLLED is not set CONFIG_INPUT_GPIO_DECODER=m CONFIG_INPUT_ATLAS_BTNS=m CONFIG_INPUT_ATI_REMOTE2=m @@ -3698,7 +3698,6 @@ CONFIG_SERIAL_8250_CS=m CONFIG_SERIAL_8250_NR_UARTS=32 CONFIG_SERIAL_8250_RUNTIME_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set -# CONFIG_SERIAL_8250_FSL is not set CONFIG_SERIAL_8250_DW=m CONFIG_SERIAL_8250_RT288X=y CONFIG_SERIAL_8250_LPSS=y @@ -3753,7 +3752,6 @@ CONFIG_HW_RANDOM_INTEL=m CONFIG_HW_RANDOM_AMD=m CONFIG_HW_RANDOM_VIA=m CONFIG_HW_RANDOM_VIRTIO=m -CONFIG_HW_RANDOM_TPM=m CONFIG_NVRAM=m CONFIG_R3964=m CONFIG_APPLICOM=m @@ -3774,6 +3772,7 @@ CONFIG_HPET_MMAP=y CONFIG_HPET_MMAP_DEFAULT=y CONFIG_HANGCHECK_TIMER=m CONFIG_TCG_TPM=m +CONFIG_HW_RANDOM_TPM=y CONFIG_TCG_TIS_CORE=m CONFIG_TCG_TIS=m CONFIG_TCG_TIS_SPI=m @@ -3860,7 +3859,6 @@ CONFIG_I2C_DESIGNWARE_BAYTRAIL=y # CONFIG_I2C_GPIO is not set CONFIG_I2C_OCORES=m CONFIG_I2C_PCA_PLATFORM=m -# CONFIG_I2C_PXA_PCI is not set CONFIG_I2C_SIMTEC=m CONFIG_I2C_XILINX=m @@ -3972,7 +3970,6 @@ CONFIG_GPIO_GENERIC=m # Memory mapped GPIO drivers # CONFIG_GPIO_AMDPT=m -CONFIG_GPIO_AXP209=m # CONFIG_GPIO_DWAPB is not set CONFIG_GPIO_EXAR=m # CONFIG_GPIO_GENERIC_PLATFORM is not set @@ -3989,6 +3986,8 @@ CONFIG_GPIO_MB86S7X=m # CONFIG_GPIO_IT87 is not set CONFIG_GPIO_SCH=m CONFIG_GPIO_SCH311X=m +# CONFIG_GPIO_WINBOND is not set +# CONFIG_GPIO_WS16C48 is not set # # I2C GPIO expanders @@ -4018,6 +4017,7 @@ CONFIG_GPIO_WHISKEY_COVE=m CONFIG_GPIO_AMD8111=m # CONFIG_GPIO_ML_IOH is not set # CONFIG_GPIO_PCI_IDIO_16 is not set +# CONFIG_GPIO_PCIE_IDIO_24 is not set # CONFIG_GPIO_RDC321X is not set # @@ -4230,6 +4230,7 @@ CONFIG_SENSORS_VIA_CPUTEMP=m CONFIG_SENSORS_VIA686A=m CONFIG_SENSORS_VT1211=m CONFIG_SENSORS_VT8231=m +# CONFIG_SENSORS_W83773G is not set CONFIG_SENSORS_W83781D=m CONFIG_SENSORS_W83791D=m CONFIG_SENSORS_W83792D=m @@ -4248,6 +4249,7 @@ CONFIG_SENSORS_XGENE=m CONFIG_SENSORS_ACPI_POWER=m CONFIG_SENSORS_ATK0110=m CONFIG_THERMAL=y +CONFIG_THERMAL_STATISTICS=y CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 CONFIG_THERMAL_HWMON=y CONFIG_THERMAL_WRITABLE_TRIPS=y @@ -4298,6 +4300,7 @@ CONFIG_ACQUIRE_WDT=m CONFIG_ADVANTECH_WDT=m CONFIG_ALIM1535_WDT=m CONFIG_ALIM7101_WDT=m +CONFIG_EBC_C384_WDT=m CONFIG_F71808E_WDT=m # CONFIG_SP5100_TCO is not set CONFIG_SBC_FITPC2_WATCHDOG=m @@ -4348,10 +4351,6 @@ CONFIG_USBPCWATCHDOG=m # # CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set CONFIG_SSB_POSSIBLE=y - -# -# Sonics Silicon Backplane -# CONFIG_SSB=m CONFIG_SSB_SPROM=y CONFIG_SSB_BLOCKIO=y @@ -4391,6 +4390,7 @@ CONFIG_MFD_AXP20X_I2C=m CONFIG_MFD_CROS_EC=m CONFIG_MFD_CROS_EC_I2C=m CONFIG_MFD_CROS_EC_SPI=m +# CONFIG_MFD_CROS_EC_CHARDEV is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set @@ -4436,9 +4436,7 @@ CONFIG_PCF50633_ADC=m CONFIG_PCF50633_GPIO=m CONFIG_UCB1400_CORE=m CONFIG_MFD_RDC321X=m -CONFIG_MFD_RTSX_PCI=m CONFIG_MFD_RT5033=m -CONFIG_MFD_RTSX_USB=m # CONFIG_MFD_RC5T583 is not set # CONFIG_MFD_SEC_CORE is not set CONFIG_MFD_SI476X_CORE=m @@ -4470,7 +4468,6 @@ CONFIG_MFD_TI_LP873X=m # CONFIG_TWL6040_CORE is not set CONFIG_MFD_WL1273_CORE=m CONFIG_MFD_LM3533=m -# CONFIG_MFD_TMIO is not set CONFIG_MFD_VX855=m CONFIG_MFD_ARIZONA=y CONFIG_MFD_ARIZONA_I2C=m @@ -4490,9 +4487,8 @@ CONFIG_CEC_CORE=m CONFIG_CEC_PIN=y CONFIG_RC_CORE=m CONFIG_RC_MAP=m +# CONFIG_LIRC is not set CONFIG_RC_DECODERS=y -CONFIG_LIRC=m -CONFIG_IR_LIRC_CODEC=m CONFIG_IR_NEC_DECODER=m CONFIG_IR_RC5_DECODER=m CONFIG_IR_RC6_DECODER=m @@ -4502,10 +4498,12 @@ CONFIG_IR_SANYO_DECODER=m CONFIG_IR_SHARP_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m CONFIG_IR_XMP_DECODER=m +# CONFIG_IR_IMON_DECODER is not set CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=m CONFIG_IR_ENE=m CONFIG_IR_IMON=m +# CONFIG_IR_IMON_RAW is not set CONFIG_IR_MCEUSB=m CONFIG_IR_ITE_CIR=m CONFIG_IR_FINTEK=m @@ -4532,6 +4530,7 @@ CONFIG_MEDIA_RADIO_SUPPORT=y CONFIG_MEDIA_SDR_SUPPORT=y CONFIG_MEDIA_CEC_SUPPORT=y CONFIG_MEDIA_CEC_RC=y +# CONFIG_CEC_PIN_ERROR_INJ is not set CONFIG_MEDIA_CONTROLLER=y # CONFIG_MEDIA_CONTROLLER_DVB is not set CONFIG_VIDEO_DEV=m @@ -4548,18 +4547,14 @@ CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_DMA_SG=m CONFIG_VIDEOBUF_VMALLOC=m CONFIG_VIDEOBUF_DVB=m -CONFIG_VIDEOBUF2_CORE=m -CONFIG_VIDEOBUF2_MEMOPS=m -CONFIG_VIDEOBUF2_DMA_CONTIG=m -CONFIG_VIDEOBUF2_VMALLOC=m -CONFIG_VIDEOBUF2_DMA_SG=m -CONFIG_VIDEOBUF2_DVB=m CONFIG_DVB_CORE=m +# CONFIG_DVB_MMAP is not set CONFIG_DVB_NET=y CONFIG_TTPCI_EEPROM=m CONFIG_DVB_MAX_ADAPTERS=16 # CONFIG_DVB_DYNAMIC_MINORS is not set # CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set +# CONFIG_DVB_ULE_DEBUG is not set # # Media drivers @@ -4815,6 +4810,7 @@ CONFIG_DVB_DDBRIDGE=m # CONFIG_DVB_DDBRIDGE_MSIENABLE is not set CONFIG_DVB_SMIPCIE=m CONFIG_DVB_NETUP_UNIDVB=m +CONFIG_VIDEO_IPU3_CIO2=m CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_VIDEO_CAFE_CCIC=m CONFIG_VIDEO_VIA_CAMERA=m @@ -4877,6 +4873,13 @@ CONFIG_MEDIA_COMMON_OPTIONS=y CONFIG_VIDEO_CX2341X=m CONFIG_VIDEO_TVEEPROM=m CONFIG_CYPRESS_FIRMWARE=m +CONFIG_VIDEOBUF2_CORE=m +CONFIG_VIDEOBUF2_V4L2=m +CONFIG_VIDEOBUF2_MEMOPS=m +CONFIG_VIDEOBUF2_DMA_CONTIG=m +CONFIG_VIDEOBUF2_VMALLOC=m +CONFIG_VIDEOBUF2_DMA_SG=m +CONFIG_VIDEOBUF2_DVB=m CONFIG_DVB_B2C2_FLEXCOP=m CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m @@ -4986,10 +4989,8 @@ CONFIG_VIDEO_M52790=m # # soc_camera sensor drivers # -CONFIG_SOC_CAMERA_IMX074=m CONFIG_SOC_CAMERA_MT9M001=m CONFIG_SOC_CAMERA_MT9M111=m -CONFIG_SOC_CAMERA_MT9T031=m CONFIG_SOC_CAMERA_MT9T112=m CONFIG_SOC_CAMERA_MT9V022=m CONFIG_SOC_CAMERA_OV5642=m @@ -4998,8 +4999,14 @@ CONFIG_SOC_CAMERA_OV9640=m CONFIG_SOC_CAMERA_OV9740=m CONFIG_SOC_CAMERA_RJ54N1=m CONFIG_SOC_CAMERA_TW9910=m + +# +# Media SPI Adapters +# +CONFIG_CXD2880_SPI_DRV=m CONFIG_MEDIA_TUNER=m CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA18250=m CONFIG_MEDIA_TUNER_TDA8290=m CONFIG_MEDIA_TUNER_TDA827X=m CONFIG_MEDIA_TUNER_TDA18271=m @@ -5173,7 +5180,6 @@ CONFIG_DVB_ISL6405=m CONFIG_DVB_ISL6421=m CONFIG_DVB_ISL6423=m CONFIG_DVB_A8293=m -CONFIG_DVB_SP2=m CONFIG_DVB_LGS8GXX=m CONFIG_DVB_ATBM8830=m CONFIG_DVB_TDA665x=m @@ -5184,10 +5190,15 @@ CONFIG_DVB_HORUS3A=m CONFIG_DVB_ASCOT2E=m CONFIG_DVB_HELENE=m +# +# Common Interface (EN50221) controller drivers +# +CONFIG_DVB_CXD2099=m +CONFIG_DVB_SP2=m + # # Tools to develop new frontends # -# CONFIG_DVB_DUMMY_FE is not set # # Graphics support @@ -5214,6 +5225,7 @@ CONFIG_DRM_TTM=m CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y CONFIG_DRM_VM=y +CONFIG_DRM_SCHED=m # # I2C encoder or helper chips @@ -5290,11 +5302,13 @@ CONFIG_HSA_AMD=m CONFIG_DRM_HISI_HIBMC=m CONFIG_DRM_TINYDRM=m CONFIG_TINYDRM_MIPI_DBI=m +CONFIG_TINYDRM_ILI9225=m CONFIG_TINYDRM_MI0283QT=m CONFIG_TINYDRM_REPAPER=m CONFIG_TINYDRM_ST7586=m +CONFIG_TINYDRM_ST7735R=m # CONFIG_DRM_LEGACY is not set -# CONFIG_DRM_LIB_RANDOM is not set +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y # # Frame buffer Devices @@ -5303,21 +5317,16 @@ CONFIG_FB=y CONFIG_FIRMWARE_EDID=y CONFIG_FB_CMDLINE=y CONFIG_FB_NOTIFY=y -# CONFIG_FB_DDC is not set CONFIG_FB_BOOT_VESA_SUPPORT=y CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set CONFIG_FB_SYS_FILLRECT=m CONFIG_FB_SYS_COPYAREA=m CONFIG_FB_SYS_IMAGEBLIT=m -# CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA is not set # CONFIG_FB_FOREIGN_ENDIAN is not set CONFIG_FB_SYS_FOPS=m CONFIG_FB_DEFERRED_IO=y -# CONFIG_FB_SVGALIB is not set -# CONFIG_FB_MACMODES is not set CONFIG_FB_BACKLIGHT=y CONFIG_FB_MODE_HELPERS=y CONFIG_FB_TILEBLITTING=y @@ -5460,7 +5469,6 @@ CONFIG_SND_SEQ_VIRMIDI=m CONFIG_SND_MPU401_UART=m CONFIG_SND_OPL3_LIB=m CONFIG_SND_OPL3_LIB_SEQ=m -# CONFIG_SND_OPL4_LIB_SEQ is not set CONFIG_SND_VX_LIB=m CONFIG_SND_AC97_CODEC=m CONFIG_SND_DRIVERS=y @@ -5616,6 +5624,7 @@ CONFIG_SND_SOC_COMPRESS=y CONFIG_SND_SOC_TOPOLOGY=y CONFIG_SND_SOC_ACPI=m CONFIG_SND_SOC_AMD_ACP=m +CONFIG_SND_SOC_AMD_CZ_DA7219MX98357_MACH=m CONFIG_SND_SOC_AMD_CZ_RT5645_MACH=m CONFIG_SND_ATMEL_SOC=m CONFIG_SND_DESIGNWARE_I2S=m @@ -5642,27 +5651,33 @@ CONFIG_SND_SOC_IMG_PARALLEL_OUT=m CONFIG_SND_SOC_IMG_SPDIF_IN=m CONFIG_SND_SOC_IMG_SPDIF_OUT=m CONFIG_SND_SOC_IMG_PISTACHIO_INTERNAL_DAC=m +CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y CONFIG_SND_SST_IPC=m +CONFIG_SND_SST_IPC_PCI=m CONFIG_SND_SST_IPC_ACPI=m -CONFIG_SND_SOC_INTEL_COMMON=m +CONFIG_SND_SOC_INTEL_SST_ACPI=m CONFIG_SND_SOC_INTEL_SST=m CONFIG_SND_SOC_INTEL_SST_FIRMWARE=m -CONFIG_SND_SOC_INTEL_SST_ACPI=m -CONFIG_SND_SOC_ACPI_INTEL_MATCH=m -CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=m CONFIG_SND_SOC_INTEL_HASWELL=m CONFIG_SND_SOC_INTEL_BAYTRAIL=m CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m +CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m +CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m CONFIG_SND_SOC_INTEL_SKYLAKE=m -CONFIG_SND_SOC_INTEL_MACH=m +CONFIG_SND_SOC_ACPI_INTEL_MATCH=m +CONFIG_SND_SOC_INTEL_MACH=y CONFIG_SND_SOC_INTEL_HASWELL_MACH=m CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m +CONFIG_SND_SOC_INTEL_BYT_MAX98090_MACH=m +CONFIG_SND_SOC_INTEL_BYT_RT5640_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m +CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=m CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH=m @@ -5673,6 +5688,7 @@ CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH=m CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=m +CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH=m # # STMicroelectronics STM32 SOC audio support @@ -5693,11 +5709,14 @@ CONFIG_SND_SOC_ADAU1761_I2C=m CONFIG_SND_SOC_ADAU1761_SPI=m CONFIG_SND_SOC_ADAU7002=m CONFIG_SND_SOC_AK4104=m +CONFIG_SND_SOC_AK4458=m CONFIG_SND_SOC_AK4554=m CONFIG_SND_SOC_AK4613=m CONFIG_SND_SOC_AK4642=m CONFIG_SND_SOC_AK5386=m +CONFIG_SND_SOC_AK5558=m CONFIG_SND_SOC_ALC5623=m +CONFIG_SND_SOC_BD28623=m # CONFIG_SND_SOC_BT_SCO is not set # CONFIG_SND_SOC_CS35L32 is not set # CONFIG_SND_SOC_CS35L33 is not set @@ -5731,13 +5750,20 @@ CONFIG_SND_SOC_INNO_RK3036=m CONFIG_SND_SOC_MAX98090=m CONFIG_SND_SOC_MAX98357A=m CONFIG_SND_SOC_MAX98504=m +CONFIG_SND_SOC_MAX9867=m CONFIG_SND_SOC_MAX98927=m +CONFIG_SND_SOC_MAX98373=m # CONFIG_SND_SOC_MAX9860 is not set # CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set # CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set # CONFIG_SND_SOC_PCM1681 is not set +CONFIG_SND_SOC_PCM1789=m +CONFIG_SND_SOC_PCM1789_I2C=m # CONFIG_SND_SOC_PCM179X_I2C is not set # CONFIG_SND_SOC_PCM179X_SPI is not set +CONFIG_SND_SOC_PCM186X=m +CONFIG_SND_SOC_PCM186X_I2C=m +CONFIG_SND_SOC_PCM186X_SPI=m # CONFIG_SND_SOC_PCM3168A_I2C is not set # CONFIG_SND_SOC_PCM3168A_SPI is not set # CONFIG_SND_SOC_PCM512x_I2C is not set @@ -5748,7 +5774,6 @@ CONFIG_SND_SOC_RT286=m CONFIG_SND_SOC_RT298=m CONFIG_SND_SOC_RT5514=m CONFIG_SND_SOC_RT5514_SPI=m -# CONFIG_SND_SOC_RT5514_SPI_BUILTIN is not set CONFIG_SND_SOC_RT5616=m CONFIG_SND_SOC_RT5631=m CONFIG_SND_SOC_RT5640=m @@ -5775,12 +5800,18 @@ CONFIG_SND_SOC_SSM4567=m # CONFIG_SND_SOC_TAS5086 is not set # CONFIG_SND_SOC_TAS571X is not set # CONFIG_SND_SOC_TAS5720 is not set +CONFIG_SND_SOC_TAS6424=m +CONFIG_SND_SOC_TDA7419=m # CONFIG_SND_SOC_TFA9879 is not set # CONFIG_SND_SOC_TLV320AIC23_I2C is not set # CONFIG_SND_SOC_TLV320AIC23_SPI is not set # CONFIG_SND_SOC_TLV320AIC31XX is not set +CONFIG_SND_SOC_TLV320AIC32X4=m +CONFIG_SND_SOC_TLV320AIC32X4_I2C=m +CONFIG_SND_SOC_TLV320AIC32X4_SPI=m # CONFIG_SND_SOC_TLV320AIC3X is not set CONFIG_SND_SOC_TS3A227E=m +CONFIG_SND_SOC_TSCS42XX=m # CONFIG_SND_SOC_WM8510 is not set # CONFIG_SND_SOC_WM8523 is not set # CONFIG_SND_SOC_WM8524 is not set @@ -5803,9 +5834,10 @@ CONFIG_SND_SOC_TS3A227E=m # CONFIG_SND_SOC_WM8978 is not set # CONFIG_SND_SOC_WM8985 is not set CONFIG_SND_SOC_ZX_AUD96P22=m +CONFIG_SND_SOC_MAX9759=m # CONFIG_SND_SOC_NAU8540 is not set # CONFIG_SND_SOC_NAU8810 is not set -# CONFIG_SND_SOC_NAU8824 is not set +CONFIG_SND_SOC_NAU8824=m CONFIG_SND_SOC_NAU8825=m # CONFIG_SND_SOC_TPA6130A2 is not set CONFIG_SND_SIMPLE_CARD_UTILS=m @@ -5847,6 +5879,7 @@ CONFIG_HID_CYPRESS=m CONFIG_HID_DRAGONRISE=m CONFIG_DRAGONRISE_FF=y CONFIG_HID_EMS_FF=m +CONFIG_HID_ELAN=m CONFIG_HID_ELECOM=m CONFIG_HID_ELO=m CONFIG_HID_EZKEY=m @@ -5854,6 +5887,7 @@ CONFIG_HID_GEMBIRD=m CONFIG_HID_GFRM=m CONFIG_HID_HOLTEK=m CONFIG_HOLTEK_FF=y +CONFIG_HID_GOOGLE_HAMMER=m CONFIG_HID_GT683R=m CONFIG_HID_KEYTOUCH=m CONFIG_HID_KYE=m @@ -5862,6 +5896,7 @@ CONFIG_HID_WALTOP=m CONFIG_HID_GYRATION=m CONFIG_HID_ICADE=m CONFIG_HID_ITE=m +CONFIG_HID_JABRA=m CONFIG_HID_TWINHAN=m CONFIG_HID_KENSINGTON=m CONFIG_HID_LCPOWER=m @@ -5967,6 +6002,7 @@ CONFIG_USB_WUSB_CBAF=m # CONFIG_USB_C67X00_HCD=m CONFIG_USB_XHCI_HCD=m +# CONFIG_USB_XHCI_DBGCAP is not set CONFIG_USB_XHCI_PCI=m # CONFIG_USB_XHCI_PLATFORM is not set CONFIG_USB_EHCI_HCD=m @@ -5976,7 +6012,6 @@ CONFIG_USB_EHCI_PCI=m # CONFIG_USB_EHCI_HCD_PLATFORM is not set CONFIG_USB_OXU210HP_HCD=m CONFIG_USB_ISP116X_HCD=m -CONFIG_USB_ISP1362_HCD=m # CONFIG_USB_FOTG210_HCD is not set CONFIG_USB_MAX3421_HCD=m CONFIG_USB_OHCI_HCD=m @@ -6087,18 +6122,6 @@ CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_IUU=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m @@ -6259,8 +6282,15 @@ CONFIG_TYPEC_TCPM=m CONFIG_TYPEC_FUSB302=m # CONFIG_TYPEC_UCSI is not set CONFIG_TYPEC_TPS6598X=m + +# +# USB Type-C Multiplexer/DeMultiplexer Switch support +# +CONFIG_TYPEC_MUX_PI3USB30532=m +CONFIG_USB_ROLES_INTEL_XHCI=m CONFIG_USB_LED_TRIG=y # CONFIG_USB_ULPI_BUS is not set +CONFIG_USB_ROLE_SWITCH=m CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -6280,6 +6310,7 @@ CONFIG_MMC_SDHCI_PCI=m CONFIG_MMC_RICOH_MMC=y CONFIG_MMC_SDHCI_ACPI=m CONFIG_MMC_SDHCI_PLTFM=m +CONFIG_MMC_SDHCI_F_SDH30=m CONFIG_MMC_WBSD=m CONFIG_MMC_TIFM_SD=m CONFIG_MMC_SPI=m @@ -6291,6 +6322,7 @@ CONFIG_MMC_USHC=m CONFIG_MMC_USDHI6ROL0=m CONFIG_MMC_REALTEK_PCI=m CONFIG_MMC_REALTEK_USB=m +CONFIG_MMC_CQHCI=m CONFIG_MMC_TOSHIBA_PCI=m CONFIG_MMC_MTK=m CONFIG_MMC_SDHCI_XENON=m @@ -6334,7 +6366,6 @@ CONFIG_LEDS_LP3952=m # CONFIG_LEDS_LP5523 is not set # CONFIG_LEDS_LP5562 is not set # CONFIG_LEDS_LP8501 is not set -CONFIG_LEDS_LP8860=m CONFIG_LEDS_CLEVO_MAIL=m CONFIG_LEDS_PCA955X=m # CONFIG_LEDS_PCA955X_GPIO is not set @@ -6353,6 +6384,7 @@ CONFIG_LEDS_LM355x=m # CONFIG_LEDS_BLINKM=m CONFIG_LEDS_MLXCPLD=m +CONFIG_LEDS_MLXREG=m CONFIG_LEDS_USER=m CONFIG_LEDS_NIC78BX=m @@ -6377,12 +6409,13 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m CONFIG_LEDS_TRIGGER_TRANSIENT=m CONFIG_LEDS_TRIGGER_CAMERA=m CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=m CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y CONFIG_INFINIBAND=m CONFIG_INFINIBAND_USER_MAD=m CONFIG_INFINIBAND_USER_ACCESS=m -# CONFIG_INFINIBAND_EXP_USER_ACCESS is not set +# CONFIG_INFINIBAND_EXP_LEGACY_VERBS_NEW_UAPI is not set CONFIG_INFINIBAND_USER_MEM=y CONFIG_INFINIBAND_ON_DEMAND_PAGING=y CONFIG_INFINIBAND_ADDR_TRANS=y @@ -6392,7 +6425,6 @@ CONFIG_INFINIBAND_MTHCA_DEBUG=y CONFIG_INFINIBAND_QIB=m # CONFIG_INFINIBAND_QIB_DCA is not set CONFIG_INFINIBAND_CXGB3=m -# CONFIG_INFINIBAND_CXGB3_DEBUG is not set CONFIG_INFINIBAND_CXGB4=m # CONFIG_INFINIBAND_I40IW is not set CONFIG_MLX4_INFINIBAND=m @@ -6546,6 +6578,7 @@ CONFIG_RTC_DRV_BQ4802=m CONFIG_RTC_DRV_RP5C01=m CONFIG_RTC_DRV_V3020=m CONFIG_RTC_DRV_PCF50633=m +# CONFIG_RTC_DRV_CROS_EC is not set # # on-CPU RTC drivers @@ -6623,11 +6656,9 @@ CONFIG_VFIO_PCI_IGD=y # CONFIG_VFIO_MDEV is not set CONFIG_IRQ_BYPASS_MANAGER=m CONFIG_VIRT_DRIVERS=y +CONFIG_VBOXGUEST=m CONFIG_VIRTIO=m - -# -# Virtio drivers -# +CONFIG_VIRTIO_MENU=y CONFIG_VIRTIO_PCI=m CONFIG_VIRTIO_PCI_LEGACY=y CONFIG_VIRTIO_BALLOON=m @@ -6675,62 +6706,16 @@ CONFIG_XEN_ACPI=y CONFIG_XEN_SYMS=y CONFIG_XEN_HAVE_VPMU=y CONFIG_STAGING=y -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -CONFIG_IRDA_ULTRA=y - -# -# IrDA options -# -CONFIG_IRDA_CACHE_LAST_LSAP=y -CONFIG_IRDA_FAST_RR=y -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -CONFIG_IRTTY_SIR=m - -# -# Dongle support -# -CONFIG_DONGLE=y -CONFIG_ESI_DONGLE=m -CONFIG_ACTISYS_DONGLE=m -CONFIG_TEKRAM_DONGLE=m -CONFIG_TOIM3232_DONGLE=m -CONFIG_LITELINK_DONGLE=m -CONFIG_MA600_DONGLE=m -CONFIG_GIRBIL_DONGLE=m -CONFIG_MCP2120_DONGLE=m -CONFIG_OLD_BELKIN_DONGLE=m -CONFIG_ACT200L_DONGLE=m -CONFIG_KINGSUN_DONGLE=m -CONFIG_KSDAZZLE_DONGLE=m -CONFIG_KS959_DONGLE=m - -# -# FIR device drivers -# -CONFIG_USB_IRDA=m -CONFIG_SIGMATEL_FIR=m -CONFIG_NSC_FIR=m -CONFIG_WINBOND_FIR=m -CONFIG_SMC_IRCC_FIR=m -CONFIG_ALI_FIR=m -CONFIG_VLSI_FIR=m -CONFIG_VIA_FIR=m -CONFIG_MCS_FIR=m +# CONFIG_IPX is not set +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +CONFIG_NCPFS_NFS_NS=y +CONFIG_NCPFS_OS2_NS=y +CONFIG_NCPFS_SMALLDOS=y +CONFIG_NCPFS_NLS=y +# CONFIG_NCPFS_EXTRAS is not set CONFIG_PRISM2_USB=m CONFIG_COMEDI=m # CONFIG_COMEDI_DEBUG is not set @@ -6834,8 +6819,6 @@ CONFIG_R8712U=m CONFIG_R8188EU=m CONFIG_88EU_AP_MODE=y CONFIG_R8822BE=m -CONFIG_RTLHALMAC_ST=m -CONFIG_RTLPHYDM_ST=m CONFIG_RTLWIFI_DEBUG_ST=y CONFIG_RTS5208=m CONFIG_VT6655=m @@ -6910,10 +6893,6 @@ CONFIG_VT6656=m # CONFIG_AD2S90 is not set # CONFIG_AD2S1200 is not set # CONFIG_AD2S1210 is not set - -# -# Triggers - standalone -# # CONFIG_FB_SM750 is not set CONFIG_FB_XGI=m @@ -6944,9 +6923,8 @@ CONFIG_INTEL_ATOMISP=y # CONFIG_VIDEO_ATOMISP_OV2680 is not set # CONFIG_VIDEO_ATOMISP_LM3554 is not set CONFIG_I2C_BCM2048=m -CONFIG_DVB_CXD2099=m -CONFIG_LIRC_STAGING=y -CONFIG_LIRC_ZILOG=m +CONFIG_SOC_CAMERA_IMX074=m +CONFIG_SOC_CAMERA_MT9T031=m # # Android @@ -6980,14 +6958,16 @@ CONFIG_WILC1000_SDIO=m CONFIG_TYPEC_TCPCI=m # CONFIG_DRM_VBOXVIDEO is not set # CONFIG_PI433 is not set +# CONFIG_MTK_MMC is not set CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m +CONFIG_ACER_WIRELESS=m CONFIG_ACERHDF=m CONFIG_ALIENWARE_WMI=m CONFIG_ASUS_LAPTOP=m CONFIG_DELL_SMBIOS=m -CONFIG_DELL_SMBIOS_WMI=m -CONFIG_DELL_SMBIOS_SMM=m +CONFIG_DELL_SMBIOS_WMI=y +CONFIG_DELL_SMBIOS_SMM=y CONFIG_DELL_LAPTOP=m CONFIG_DELL_WMI=m CONFIG_DELL_WMI_DESCRIPTOR=m @@ -6998,6 +6978,7 @@ CONFIG_DELL_RBTN=m CONFIG_FUJITSU_LAPTOP=m CONFIG_FUJITSU_TABLET=m CONFIG_AMILO_RFKILL=m +CONFIG_GPD_POCKET_FAN=m CONFIG_HP_ACCEL=m CONFIG_HP_WIRELESS=m CONFIG_HP_WMI=m @@ -7053,18 +7034,19 @@ CONFIG_SURFACE_PRO3_BUTTON=m CONFIG_INTEL_PUNIT_IPC=m CONFIG_INTEL_TELEMETRY=m CONFIG_MLX_PLATFORM=m -CONFIG_MLX_CPLD_PLATFORM=m CONFIG_INTEL_TURBO_MAX_3=y CONFIG_SILEAD_DMI=y +CONFIG_INTEL_CHTDC_TI_PWRBTN=m CONFIG_PMC_ATOM=y CONFIG_CHROME_PLATFORMS=y CONFIG_CHROMEOS_LAPTOP=m CONFIG_CHROMEOS_PSTORE=m -CONFIG_CROS_EC_CHARDEV=m CONFIG_CROS_EC_LPC=m # CONFIG_CROS_EC_LPC_MEC is not set CONFIG_CROS_EC_PROTO=y CONFIG_CROS_KBD_LED_BACKLIGHT=m +CONFIG_MELLANOX_PLATFORM=y +CONFIG_MLXREG_HOTPLUG=m CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y @@ -7073,11 +7055,9 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # # CONFIG_COMMON_CLK_SI5351 is not set +# CONFIG_COMMON_CLK_SI544 is not set # CONFIG_COMMON_CLK_CDCE706 is not set # CONFIG_COMMON_CLK_CS2000_CP is not set -# CONFIG_COMMON_CLK_NXP is not set -# CONFIG_COMMON_CLK_PXA is not set -# CONFIG_COMMON_CLK_PIC32 is not set # CONFIG_HWSPINLOCK is not set # @@ -7086,11 +7066,6 @@ CONFIG_COMMON_CLK=y CONFIG_CLKEVT_I8253=y CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y -# CONFIG_ATMEL_PIT is not set -# CONFIG_SH_TIMER_CMT is not set -# CONFIG_SH_TIMER_MTU2 is not set -# CONFIG_SH_TIMER_TMU is not set -# CONFIG_EM_TIMER_STI is not set CONFIG_MAILBOX=y CONFIG_PCC=y # CONFIG_ALTERA_MBOX is not set @@ -7120,6 +7095,14 @@ CONFIG_REMOTEPROC=m # # CONFIG_RPMSG_QCOM_GLINK_RPM is not set # CONFIG_RPMSG_VIRTIO is not set +CONFIG_SOUNDWIRE=y + +# +# SoundWire Devices +# +CONFIG_SOUNDWIRE_BUS=m +CONFIG_SOUNDWIRE_CADENCE=m +CONFIG_SOUNDWIRE_INTEL=m # # SOC (System On Chip) specific Drivers @@ -7140,8 +7123,12 @@ CONFIG_REMOTEPROC=m # # Qualcomm SoC drivers # -# CONFIG_SUNXI_SRAM is not set # CONFIG_SOC_TI is not set + +# +# Xilinx SoC drivers +# +CONFIG_XILINX_VCU=m CONFIG_PM_DEVFREQ=y # @@ -7176,6 +7163,7 @@ CONFIG_MEMORY=y CONFIG_IIO=m CONFIG_IIO_BUFFER=y CONFIG_IIO_BUFFER_CB=m +CONFIG_IIO_BUFFER_HW_CONSUMER=m CONFIG_IIO_KFIFO_BUF=m CONFIG_IIO_TRIGGERED_BUFFER=m CONFIG_IIO_CONFIGFS=m @@ -7416,11 +7404,15 @@ CONFIG_HID_SENSOR_ALS=m CONFIG_RPR0521=m # CONFIG_SENSORS_LM3533 is not set # CONFIG_LTR501 is not set +# CONFIG_LV0104CS is not set # CONFIG_MAX44000 is not set CONFIG_OPT3001=m CONFIG_PA12203001=m # CONFIG_SI1145 is not set CONFIG_STK3310=m +CONFIG_ST_UVIS25=m +CONFIG_ST_UVIS25_I2C=m +CONFIG_ST_UVIS25_SPI=m # CONFIG_TCS3414 is not set # CONFIG_TCS3472 is not set # CONFIG_SENSORS_TSL2563 is not set @@ -7430,6 +7422,7 @@ CONFIG_STK3310=m # CONFIG_VCNL4000 is not set # CONFIG_VEML6070 is not set # CONFIG_VL6180 is not set +CONFIG_ZOPT2201=m # # Magnetometer sensors @@ -7469,9 +7462,11 @@ CONFIG_IIO_INTERRUPT_TRIGGER=m # # Digital potentiometers # +# CONFIG_AD5272 is not set # CONFIG_DS1803 is not set # CONFIG_MAX5481 is not set # CONFIG_MAX5487 is not set +# CONFIG_MCP4018 is not set # CONFIG_MCP4131 is not set # CONFIG_MCP4531 is not set # CONFIG_TPL0102 is not set @@ -7525,6 +7520,7 @@ CONFIG_ZPA2326_SPI=m # CONFIG_MAXIM_THERMOCOUPLE is not set # CONFIG_HID_SENSOR_TEMP is not set # CONFIG_MLX90614 is not set +# CONFIG_MLX90632 is not set # CONFIG_TMP006 is not set # CONFIG_TMP007 is not set # CONFIG_TSYS01 is not set @@ -7537,24 +7533,11 @@ CONFIG_ZPA2326_SPI=m # IRQ chip support # CONFIG_ARM_GIC_MAX_NR=1 -# CONFIG_ARM_GIC_V3_ITS is not set CONFIG_IPACK_BUS=m CONFIG_BOARD_TPCI200=m CONFIG_SERIAL_IPOCTAL=m CONFIG_RESET_CONTROLLER=y -# CONFIG_RESET_ATH79 is not set -# CONFIG_RESET_AXS10X is not set -# CONFIG_RESET_BERLIN is not set -# CONFIG_RESET_IMX7 is not set -# CONFIG_RESET_LANTIQ is not set -# CONFIG_RESET_LPC18XX is not set -# CONFIG_RESET_MESON is not set -# CONFIG_RESET_PISTACHIO is not set -# CONFIG_RESET_SIMPLE is not set -# CONFIG_RESET_SUNXI is not set # CONFIG_RESET_TI_SYSCON is not set -# CONFIG_RESET_ZYNQ is not set -# CONFIG_RESET_TEGRA_BPMP is not set CONFIG_FMC=m CONFIG_FMC_FAKEDEV=m CONFIG_FMC_TRIVIAL=m @@ -7593,10 +7576,15 @@ CONFIG_BTT=y CONFIG_ND_PFN=m CONFIG_NVDIMM_PFN=y CONFIG_NVDIMM_DAX=y -CONFIG_DAX=m +CONFIG_DAX_DRIVER=y +CONFIG_DAX=y CONFIG_DEV_DAX=m CONFIG_DEV_DAX_PMEM=m CONFIG_NVMEM=y + +# +# HW tracing support +# CONFIG_STM=m CONFIG_STM_DUMMY=m CONFIG_STM_SOURCE_CONSOLE=m @@ -7604,25 +7592,24 @@ CONFIG_STM_SOURCE_CONSOLE=m # CONFIG_STM_SOURCE_FTRACE is not set CONFIG_INTEL_TH=m CONFIG_INTEL_TH_PCI=m +CONFIG_INTEL_TH_ACPI=m CONFIG_INTEL_TH_GTH=m CONFIG_INTEL_TH_STH=m CONFIG_INTEL_TH_MSU=m CONFIG_INTEL_TH_PTI=m # CONFIG_INTEL_TH_DEBUG is not set CONFIG_FPGA=m -CONFIG_FPGA_MGR_ALTERA_CVP=m -CONFIG_FPGA_MGR_ALTERA_PS_SPI=m -CONFIG_FPGA_MGR_XILINX_SPI=m CONFIG_ALTERA_PR_IP_CORE=m - -# -# FSI support -# -CONFIG_FSI=m -# CONFIG_FSI_MASTER_GPIO is not set -# CONFIG_FSI_MASTER_HUB is not set -# CONFIG_FSI_SCOM is not set +CONFIG_FPGA_MGR_ALTERA_PS_SPI=m +CONFIG_FPGA_MGR_ALTERA_CVP=m +CONFIG_FPGA_MGR_XILINX_SPI=m +# CONFIG_FPGA_BRIDGE is not set CONFIG_PM_OPP=y +CONFIG_UNISYS_VISORBUS=m +CONFIG_SIOX=m +CONFIG_SIOX_BUS_GPIO=m +CONFIG_SLIMBUS=m +CONFIG_SLIM_QCOM_CTRL=m # # Firmware Drivers @@ -7747,6 +7734,7 @@ CONFIG_OVERLAY_FS=m # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set +# CONFIG_OVERLAY_FS_XINO_AUTO is not set # # Caches @@ -7822,9 +7810,7 @@ CONFIG_JFFS2_FS_WRITEBUFFER=y # CONFIG_JFFS2_FS_XATTR is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y -# CONFIG_JFFS2_LZO is not set CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set CONFIG_UBIFS_FS=m # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y @@ -7862,9 +7848,14 @@ CONFIG_ROMFS_BACKED_BY_BLOCK=y # CONFIG_ROMFS_BACKED_BY_BOTH is not set CONFIG_ROMFS_ON_BLOCK=y CONFIG_PSTORE=y -CONFIG_PSTORE_ZLIB_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS=y # CONFIG_PSTORE_LZO_COMPRESS is not set # CONFIG_PSTORE_LZ4_COMPRESS is not set +# CONFIG_PSTORE_LZ4HC_COMPRESS is not set +# CONFIG_PSTORE_842_COMPRESS is not set +CONFIG_PSTORE_COMPRESS=y +CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y +CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_FTRACE is not set @@ -7931,16 +7922,8 @@ CONFIG_CIFS_ACL=y # CONFIG_CIFS_DEBUG is not set CONFIG_CIFS_DFS_UPCALL=y CONFIG_CIFS_SMB311=y +# CONFIG_CIFS_SMB_DIRECT is not set CONFIG_CIFS_FSCACHE=y -CONFIG_NCP_FS=m -# CONFIG_NCPFS_PACKET_SIGNING is not set -# CONFIG_NCPFS_IOCTL_LOCKING is not set -# CONFIG_NCPFS_STRONG is not set -CONFIG_NCPFS_NFS_NS=y -CONFIG_NCPFS_OS2_NS=y -CONFIG_NCPFS_SMALLDOS=y -CONFIG_NCPFS_NLS=y -# CONFIG_NCPFS_EXTRAS is not set CONFIG_CODA_FS=m CONFIG_AFS_FS=m # CONFIG_AFS_DEBUG is not set @@ -8032,8 +8015,7 @@ CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_FRAME_POINTER=y -# CONFIG_STACK_VALIDATION is not set +CONFIG_STACK_VALIDATION=y # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x0 @@ -8072,13 +8054,13 @@ CONFIG_ARCH_HAS_KCOV=y # CONFIG_LOCKUP_DETECTOR=y CONFIG_SOFTLOCKUP_DETECTOR=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_HARDLOCKUP_DETECTOR_PERF=y CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y CONFIG_HARDLOCKUP_DETECTOR=y # CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0 -# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set @@ -8097,13 +8079,15 @@ CONFIG_SCHEDSTATS=y # # Lock Debugging (spinlocks, mutexes, etc...) # +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_LOCK_TORTURE_TEST is not set @@ -8121,8 +8105,6 @@ CONFIG_DEBUG_BUGVERBOSE=y # # RCU Debugging # -# CONFIG_PROVE_RCU is not set -# CONFIG_TORTURE_TEST is not set # CONFIG_RCU_PERF_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set CONFIG_RCU_CPU_STALL_TIMEOUT=60 @@ -8133,6 +8115,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set +CONFIG_FUNCTION_ERROR_INJECTION=y # CONFIG_LATENCYTOP is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y @@ -8166,7 +8149,6 @@ CONFIG_TRACER_SNAPSHOT=y # CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not set CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y CONFIG_KPROBE_EVENTS=y @@ -8176,6 +8158,7 @@ CONFIG_PROBE_EVENTS=y CONFIG_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE_WITH_REGS=y CONFIG_FUNCTION_PROFILER=y +# CONFIG_BPF_KPROBE_OVERRIDE is not set CONFIG_FTRACE_MCOUNT_RECORD=y # CONFIG_FTRACE_STARTUP_TEST is not set CONFIG_MMIOTRACE=y @@ -8188,10 +8171,7 @@ CONFIG_RING_BUFFER_BENCHMARK=m CONFIG_TRACING_EVENTS_GPIO=y # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set # CONFIG_DMA_API_DEBUG is not set - -# -# Runtime Testing -# +CONFIG_RUNTIME_TESTING_MENU=y CONFIG_LKDTM=m # CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_SORT is not set @@ -8214,7 +8194,7 @@ CONFIG_TEST_KSTRTOX=m # CONFIG_TEST_LKM is not set # CONFIG_TEST_USER_COPY is not set # CONFIG_TEST_BPF is not set -# CONFIG_TEST_FIND_BIT is not set +# CONFIG_FIND_BIT_BENCHMARK is not set # CONFIG_TEST_FIRMWARE is not set # CONFIG_TEST_SYSCTL is not set # CONFIG_TEST_UDELAY is not set @@ -8226,7 +8206,6 @@ CONFIG_TEST_KSTRTOX=m CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y -# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set # CONFIG_UBSAN is not set CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y CONFIG_STRICT_DEVMEM=y @@ -8237,14 +8216,12 @@ CONFIG_EARLY_PRINTK=y # CONFIG_EARLY_PRINTK_DBGP is not set CONFIG_EARLY_PRINTK_EFI=y CONFIG_EARLY_PRINTK_USB_XDBC=y -# CONFIG_X86_PTDUMP_CORE is not set # CONFIG_X86_PTDUMP is not set # CONFIG_EFI_PGT_DUMP is not set # CONFIG_DEBUG_WX is not set CONFIG_DOUBLEFAULT=y # CONFIG_DEBUG_TLBFLUSH is not set # CONFIG_IOMMU_DEBUG is not set -# CONFIG_IOMMU_STRESS is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y # CONFIG_X86_DECODER_SELFTEST is not set CONFIG_IO_DELAY_TYPE_0X80=0 @@ -8263,8 +8240,8 @@ CONFIG_OPTIMIZE_INLINING=y # CONFIG_DEBUG_NMI_SELFTEST is not set # CONFIG_X86_DEBUG_FPU is not set # CONFIG_PUNIT_ATOM_DEBUG is not set -# CONFIG_UNWINDER_ORC is not set -CONFIG_UNWINDER_FRAME_POINTER=y +CONFIG_UNWINDER_ORC=y +# CONFIG_UNWINDER_FRAME_POINTER is not set # # Security options @@ -8278,7 +8255,6 @@ CONFIG_ENCRYPTED_KEYS=m CONFIG_KEY_DH_OPERATIONS=y # CONFIG_SECURITY_DMESG_RESTRICT is not set CONFIG_SECURITY=y -# CONFIG_SECURITY_WRITABLE_HOOKS is not set CONFIG_SECURITYFS=y CONFIG_SECURITY_NETWORK=y CONFIG_PAGE_TABLE_ISOLATION=y @@ -8352,7 +8328,6 @@ CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_MCRYPTD=m CONFIG_CRYPTO_AUTHENC=m CONFIG_CRYPTO_TEST=m -CONFIG_CRYPTO_ABLK_HELPER=m CONFIG_CRYPTO_SIMD=m CONFIG_CRYPTO_GLUE_HELPER_X86=m CONFIG_CRYPTO_ENGINE=m @@ -8370,6 +8345,7 @@ CONFIG_CRYPTO_ECHAINIV=m # Block modes # CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_CFB=m CONFIG_CRYPTO_CTR=m CONFIG_CRYPTO_CTS=m CONFIG_CRYPTO_ECB=y @@ -8454,6 +8430,8 @@ CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m CONFIG_CRYPTO_SERPENT_AVX_X86_64=m CONFIG_CRYPTO_SERPENT_AVX2_X86_64=m +CONFIG_CRYPTO_SM4=m +CONFIG_CRYPTO_SPECK=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m @@ -8464,7 +8442,7 @@ CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m # # Compression # -CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DEFLATE=y CONFIG_CRYPTO_LZO=y CONFIG_CRYPTO_842=m CONFIG_CRYPTO_LZ4=m @@ -8490,11 +8468,11 @@ CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_PADLOCK=m CONFIG_CRYPTO_DEV_PADLOCK_AES=m CONFIG_CRYPTO_DEV_PADLOCK_SHA=m -# CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set CONFIG_CRYPTO_DEV_CCP=y CONFIG_CRYPTO_DEV_CCP_DD=m CONFIG_CRYPTO_DEV_SP_CCP=y CONFIG_CRYPTO_DEV_CCP_CRYPTO=m +CONFIG_CRYPTO_DEV_SP_PSP=y CONFIG_CRYPTO_DEV_QAT=m CONFIG_CRYPTO_DEV_QAT_DH895xCC=m CONFIG_CRYPTO_DEV_QAT_C3XXX=m @@ -8537,6 +8515,7 @@ CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m +CONFIG_KVM_AMD_SEV=y CONFIG_KVM_MMU_AUDIT=y CONFIG_VHOST_NET=m CONFIG_VHOST_SCSI=m @@ -8550,7 +8529,6 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_BITREVERSE=y -# CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_RATIONAL=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y @@ -8575,7 +8553,6 @@ CONFIG_CRC7=m CONFIG_LIBCRC32C=m CONFIG_CRC8=m CONFIG_XXHASH=m -# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set # CONFIG_RANDOM32_SELFTEST is not set CONFIG_842_COMPRESS=m CONFIG_842_DECOMPRESS=m @@ -8618,7 +8595,8 @@ CONFIG_ASSOCIATIVE_ARRAY=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y -# CONFIG_DMA_NOOP_OPS is not set +CONFIG_SGL_ALLOC=y +CONFIG_DMA_DIRECT_OPS=y CONFIG_DMA_VIRT_OPS=y CONFIG_CHECK_SIGNATURE=y CONFIG_CPU_RMAP=y @@ -8648,7 +8626,6 @@ CONFIG_FONT_8x16=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set CONFIG_FONT_AUTOSELECT=y -# CONFIG_SG_SPLIT is not set CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAS_PMEM_API=y diff --git a/talimatname/genel/k/kernel/kernel.kur-kos b/talimatname/genel/k/kernel/kernel.kur-kos index 58f3a6f27..1e7f71c6e 100644 --- a/talimatname/genel/k/kernel/kernel.kur-kos +++ b/talimatname/genel/k/kernel/kernel.kur-kos @@ -1,5 +1,5 @@ #!/bin/bash -surum=4.15.7 +surum=4.17.14 sonek=milis depmod ${surum}-$sonek cd /boot diff --git a/talimatname/genel/k/kernel/talimat b/talimatname/genel/k/kernel/talimat index c687de656..164846f0c 100644 --- a/talimatname/genel/k/kernel/talimat +++ b/talimatname/genel/k/kernel/talimat @@ -1,12 +1,12 @@ # Tanım: Kararli kernel sürümü # URL: http://www.kernel.org # Paketçi: milisarge -# Gerekler: linux-firmware intel-ucode +# Gerekler: linux-firmware intel-ucode elfutils # Grup: sistem isim=kernel -_basekernel=4.15 -surum=4.15.7 +_basekernel=4.17 +surum=4.17.14 devir=1 kaynak=(http://www.kernel.org/pub/linux/kernel/v4.x/linux-$_basekernel.tar.xz @@ -74,7 +74,7 @@ derle() { cp arch/$KARCH/boot/bzImage "${PKG}/boot/kernel-${surum}" # vmlinux un source a eklenmesi,modül derlerken bu geçici silinecek - install -D -m644 vmlinux "${PKG}/usr/src/linux-${_kernver}/vmlinux" + #install -D -m644 vmlinux "${PKG}/usr/src/linux-${_kernver}/vmlinux" # derleme kalıntılarının temizlenmesi rm -f "${PKG}"/lib/modules/${_kernver}/{source,build} @@ -160,8 +160,8 @@ derle() { cp net/mac80211/*.h "${PKG}/usr/src/linux-${_kernver}/net/mac80211/" # add dvb headers for external modules - mkdir -p "${PKG}/usr/src/linux-${_kernver}/drivers/media/dvb-core" - cp drivers/media/dvb-core/*.h "${PKG}/usr/src/linux-${_kernver}/drivers/media/dvb-core/" + #mkdir -p "${PKG}/usr/src/linux-${_kernver}/drivers/media/dvb-core" + #cp drivers/media/dvb-core/*.h "${PKG}/usr/src/linux-${_kernver}/drivers/media/dvb-core/" # and... mkdir -p "${PKG}/usr/src/linux-${_kernver}/include/config/dvb/" cp include/config/dvb/*.h "${PKG}/usr/src/linux-${_kernver}/include/config/dvb/" @@ -208,6 +208,9 @@ derle() { esac done + # add objtool, nvidia needed + install -Dt "${PKG}/usr/src/linux-${_kernver}/tools/objtool" tools/objtool/objtool + # remove unneeded architectures rm -rf "${PKG}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} } diff --git a/talimatname/genel/k/kernel/tmpfs-idr.patch b/talimatname/genel/k/kernel/tmpfs-idr.patch index ec610557a..376b96cc8 100644 --- a/talimatname/genel/k/kernel/tmpfs-idr.patch +++ b/talimatname/genel/k/kernel/tmpfs-idr.patch @@ -1,6 +1,6 @@ SPDX-License-Identifier: GPL-2.0 diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h -index 06b295b..45e4de6 100644 +index 73b5e65..0185e47 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -25,10 +25,13 @@ struct shmem_inode_info { @@ -20,7 +20,7 @@ index 06b295b..45e4de6 100644 umode_t mode; /* Mount mode for root directory */ unsigned char huge; /* Whether to try for hugepages */ diff --git a/mm/shmem.c b/mm/shmem.c -index 7fbe67b..f6695c1 100644 +index 9d6c7e5..d2f0cc8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -111,9 +111,13 @@ static unsigned long shmem_default_max_blocks(void) @@ -39,7 +39,7 @@ index 7fbe67b..f6695c1 100644 } #endif -@@ -1082,6 +1086,11 @@ static void shmem_evict_inode(struct inode *inode) +@@ -1091,6 +1095,11 @@ static void shmem_evict_inode(struct inode *inode) simple_xattrs_free(&info->xattrs); WARN_ON(inode->i_blocks); @@ -51,7 +51,7 @@ index 7fbe67b..f6695c1 100644 shmem_free_inode(inode->i_sb); clear_inode(inode); } -@@ -2150,13 +2159,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode +@@ -2162,13 +2171,13 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode struct inode *inode; struct shmem_inode_info *info; struct shmem_sb_info *sbinfo = SHMEM_SB(sb); @@ -66,7 +66,7 @@ index 7fbe67b..f6695c1 100644 inode_init_owner(inode, dir, mode); inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); -@@ -2198,6 +2207,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode +@@ -2210,6 +2219,25 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode mpol_shared_policy_init(&info->policy, NULL); break; } @@ -92,7 +92,7 @@ index 7fbe67b..f6695c1 100644 } else shmem_free_inode(sb); return inode; -@@ -3397,8 +3425,7 @@ static struct dentry *shmem_get_parent(struct dentry *child) +@@ -3423,8 +3451,7 @@ static struct dentry *shmem_get_parent(struct dentry *child) static int shmem_match(struct inode *ino, void *vfh) { __u32 *fh = vfh; @@ -102,7 +102,7 @@ index 7fbe67b..f6695c1 100644 return ino->i_ino == inum && fh[0] == ino->i_generation; } -@@ -3409,14 +3436,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, +@@ -3435,14 +3462,11 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, struct dentry *dentry = NULL; u64 inum; @@ -120,7 +120,7 @@ index 7fbe67b..f6695c1 100644 if (inode) { dentry = d_find_alias(inode); iput(inode); -@@ -3428,30 +3452,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, +@@ -3454,30 +3478,15 @@ static struct dentry *shmem_fh_to_dentry(struct super_block *sb, static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len, struct inode *parent) { @@ -154,7 +154,7 @@ index 7fbe67b..f6695c1 100644 return 1; } -@@ -3515,7 +3524,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo, +@@ -3541,7 +3550,7 @@ static int shmem_parse_options(char *options, struct shmem_sb_info *sbinfo, goto bad_val; } else if (!strcmp(this_char,"nr_inodes")) { sbinfo->max_inodes = memparse(value, &rest); @@ -163,7 +163,7 @@ index 7fbe67b..f6695c1 100644 goto bad_val; } else if (!strcmp(this_char,"mode")) { if (remount) -@@ -3580,7 +3589,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data) +@@ -3606,7 +3615,7 @@ static int shmem_remount_fs(struct super_block *sb, int *flags, char *data) { struct shmem_sb_info *sbinfo = SHMEM_SB(sb); struct shmem_sb_info config = *sbinfo; @@ -172,7 +172,7 @@ index 7fbe67b..f6695c1 100644 int error = -EINVAL; config.mpol = NULL; -@@ -3629,7 +3638,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) +@@ -3655,7 +3664,7 @@ static int shmem_show_options(struct seq_file *seq, struct dentry *root) seq_printf(seq, ",size=%luk", sbinfo->max_blocks << (PAGE_SHIFT - 10)); if (sbinfo->max_inodes != shmem_default_max_inodes()) @@ -181,7 +181,7 @@ index 7fbe67b..f6695c1 100644 if (sbinfo->mode != (S_IRWXUGO | S_ISVTX)) seq_printf(seq, ",mode=%03ho", sbinfo->mode); if (!uid_eq(sbinfo->uid, GLOBAL_ROOT_UID)) -@@ -3747,6 +3756,8 @@ static void shmem_put_super(struct super_block *sb) +@@ -3766,6 +3775,8 @@ static void shmem_put_super(struct super_block *sb) { struct shmem_sb_info *sbinfo = SHMEM_SB(sb); @@ -190,7 +190,7 @@ index 7fbe67b..f6695c1 100644 percpu_counter_destroy(&sbinfo->used_blocks); mpol_put(sbinfo->mpol); kfree(sbinfo); -@@ -3765,6 +3776,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) +@@ -3784,6 +3795,8 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) if (!sbinfo) return -ENOMEM; @@ -199,7 +199,7 @@ index 7fbe67b..f6695c1 100644 sbinfo->mode = S_IRWXUGO | S_ISVTX; sbinfo->uid = current_fsuid(); sbinfo->gid = current_fsgid(); -@@ -3872,6 +3885,15 @@ static void shmem_destroy_inodecache(void) +@@ -3891,6 +3904,15 @@ static void shmem_destroy_inodecache(void) kmem_cache_destroy(shmem_inode_cachep); } @@ -215,7 +215,7 @@ index 7fbe67b..f6695c1 100644 static const struct address_space_operations shmem_aops = { .writepage = shmem_writepage, .set_page_dirty = __set_page_dirty_no_writeback, -@@ -4002,6 +4024,7 @@ int __init shmem_init(void) +@@ -4021,6 +4043,7 @@ int __init shmem_init(void) pr_err("Could not kern_mount tmpfs\n"); goto out1; } diff --git a/talimatname/genel/k/kernel/vfs-ino.patch b/talimatname/genel/k/kernel/vfs-ino.patch index 4b7b944d3..3a23a6bd2 100644 --- a/talimatname/genel/k/kernel/vfs-ino.patch +++ b/talimatname/genel/k/kernel/vfs-ino.patch @@ -1,9 +1,9 @@ SPDX-License-Identifier: GPL-2.0 diff --git a/fs/inode.c b/fs/inode.c -index 03102d6..a0b03c7 100644 +index 3b55391..94924d2 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -856,6 +856,8 @@ unsigned int get_next_ino(void) +@@ -861,6 +861,8 @@ unsigned int get_next_ino(void) unsigned int *p = &get_cpu_var(last_ino); unsigned int res = *p; @@ -12,7 +12,7 @@ index 03102d6..a0b03c7 100644 #ifdef CONFIG_SMP if (unlikely((res & (LAST_INO_BATCH-1)) == 0)) { static atomic_t shared_last_ino; -@@ -868,7 +870,7 @@ unsigned int get_next_ino(void) +@@ -873,7 +875,7 @@ unsigned int get_next_ino(void) res++; /* get_next_ino should not provide a 0 inode number */ if (unlikely(!res))