File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 12
12
#include <linux/init.h>
13
13
#include <linux/module.h>
14
14
#include <linux/mutex.h>
15
+ #include <linux/sched/mm.h>
15
16
#include <linux/sched/signal.h>
16
17
#include <linux/blkpg.h>
17
18
#include <linux/bio.h>
@@ -2939,17 +2940,25 @@ EXPORT_SYMBOL_GPL(dm_internal_resume_fast);
2939
2940
int dm_kobject_uevent (struct mapped_device * md , enum kobject_action action ,
2940
2941
unsigned cookie )
2941
2942
{
2943
+ int r ;
2944
+ unsigned noio_flag ;
2942
2945
char udev_cookie [DM_COOKIE_LENGTH ];
2943
2946
char * envp [] = { udev_cookie , NULL };
2944
2947
2948
+ noio_flag = memalloc_noio_save ();
2949
+
2945
2950
if (!cookie )
2946
- return kobject_uevent (& disk_to_dev (md -> disk )-> kobj , action );
2951
+ r = kobject_uevent (& disk_to_dev (md -> disk )-> kobj , action );
2947
2952
else {
2948
2953
snprintf (udev_cookie , DM_COOKIE_LENGTH , "%s=%u" ,
2949
2954
DM_COOKIE_ENV_VAR_NAME , cookie );
2950
- return kobject_uevent_env (& disk_to_dev (md -> disk )-> kobj ,
2951
- action , envp );
2955
+ r = kobject_uevent_env (& disk_to_dev (md -> disk )-> kobj ,
2956
+ action , envp );
2952
2957
}
2958
+
2959
+ memalloc_noio_restore (noio_flag );
2960
+
2961
+ return r ;
2953
2962
}
2954
2963
2955
2964
uint32_t dm_next_uevent_seq (struct mapped_device * md )
You can’t perform that action at this time.
0 commit comments