projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm: Account for a THP NUMA hinting update as one PTE update
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
fs
/
direct-io.c
diff --git
a/fs/direct-io.c
b/fs/direct-io.c
index
1782023
..
0e04142
100644
(file)
--- a/
fs/direct-io.c
+++ b/
fs/direct-io.c
@@
-544,6
+544,7
@@
static inline int dio_bio_reap(struct dio *dio, struct dio_submit *sdio)
*/
static int sb_init_dio_done_wq(struct super_block *sb)
{
*/
static int sb_init_dio_done_wq(struct super_block *sb)
{
+ struct workqueue_struct *old;
struct workqueue_struct *wq = alloc_workqueue("dio/%s",
WQ_MEM_RECLAIM, 0,
sb->s_id);
struct workqueue_struct *wq = alloc_workqueue("dio/%s",
WQ_MEM_RECLAIM, 0,
sb->s_id);
@@
-552,9
+553,9
@@
static int sb_init_dio_done_wq(struct super_block *sb)
/*
* This has to be atomic as more DIOs can race to create the workqueue
*/
/*
* This has to be atomic as more DIOs can race to create the workqueue
*/
- cmpxchg(&sb->s_dio_done_wq, NULL, wq);
+
old =
cmpxchg(&sb->s_dio_done_wq, NULL, wq);
/* Someone created workqueue before us? Free ours... */
/* Someone created workqueue before us? Free ours... */
- if (
wq != sb->s_dio_done_wq
)
+ if (
old
)
destroy_workqueue(wq);
return 0;
}
destroy_workqueue(wq);
return 0;
}