diff options
Diffstat (limited to 'debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch')
-rw-r--r-- | debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index 998249e73..e3cf0e934 100644 --- a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 20 Oct 2017 11:29:53 +0200 Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2-rt1.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -2412,9 +2412,10 @@ EXPORT_SYMBOL(d_rehash); +@@ -2418,9 +2418,10 @@ EXPORT_SYMBOL(d_rehash); static inline unsigned start_dir_add(struct inode *dir) { @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return n; cpu_relax(); } -@@ -2422,7 +2423,8 @@ static inline unsigned start_dir_add(str +@@ -2428,7 +2429,8 @@ static inline unsigned start_dir_add(str static inline void end_dir_add(struct inode *dir, unsigned n) { @@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } static void d_wait_lookup(struct dentry *dentry) -@@ -2455,7 +2457,7 @@ struct dentry *d_alloc_parallel(struct d +@@ -2461,7 +2463,7 @@ struct dentry *d_alloc_parallel(struct d retry: rcu_read_lock(); @@ -56,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> r_seq = read_seqbegin(&rename_lock); dentry = __d_lookup_rcu(parent, name, &d_seq); if (unlikely(dentry)) { -@@ -2483,7 +2485,7 @@ struct dentry *d_alloc_parallel(struct d +@@ -2489,7 +2491,7 @@ struct dentry *d_alloc_parallel(struct d } hlist_bl_lock(b); @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> goto retry; --- a/fs/inode.c +++ b/fs/inode.c -@@ -155,7 +155,7 @@ int inode_init_always(struct super_block +@@ -156,7 +156,7 @@ int inode_init_always(struct super_block inode->i_bdev = NULL; inode->i_cdev = NULL; inode->i_link = NULL; @@ -78,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/fs/libfs.c +++ b/fs/libfs.c -@@ -90,7 +90,7 @@ static struct dentry *next_positive(stru +@@ -91,7 +91,7 @@ static struct dentry *next_positive(stru struct list_head *from, int count) { @@ -87,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct dentry *res; struct list_head *p; bool skipped; -@@ -123,8 +123,9 @@ static struct dentry *next_positive(stru +@@ -124,8 +124,9 @@ static struct dentry *next_positive(stru static void move_cursor(struct dentry *cursor, struct list_head *after) { struct dentry *parent = cursor->d_parent; @@ -98,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> for (;;) { n = *seq; if (!(n & 1) && cmpxchg(seq, n, n + 1) == n) -@@ -137,6 +138,7 @@ static void move_cursor(struct dentry *c +@@ -138,6 +139,7 @@ static void move_cursor(struct dentry *c else list_add_tail(&cursor->d_child, &parent->d_subdirs); smp_store_release(seq, n + 2); @@ -108,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -694,7 +694,7 @@ struct inode { +@@ -709,7 +709,7 @@ struct inode { struct block_device *i_bdev; struct cdev *i_cdev; char *i_link; |