File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 10
10
#include <linux/kobject.h>
11
11
#include <linux/bug.h>
12
12
#include <linux/debugfs.h>
13
+ #include <linux/sched/mm.h>
13
14
14
15
#include "ctree.h"
15
16
#include "disk-io.h"
@@ -766,7 +767,9 @@ int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
766
767
{
767
768
int error = 0 ;
768
769
struct btrfs_device * dev ;
770
+ unsigned int nofs_flag ;
769
771
772
+ nofs_flag = memalloc_nofs_save ();
770
773
list_for_each_entry (dev , & fs_devices -> devices , dev_list ) {
771
774
struct hd_struct * disk ;
772
775
struct kobject * disk_kobj ;
@@ -785,6 +788,7 @@ int btrfs_sysfs_add_device_link(struct btrfs_fs_devices *fs_devices,
785
788
if (error )
786
789
break ;
787
790
}
791
+ memalloc_nofs_restore (nofs_flag );
788
792
789
793
return error ;
790
794
}
You can’t perform that action at this time.
0 commit comments