|
Lines 3300-3313
static int fault_around_bytes_set(void *data, u64 val)
Link Here
|
| 3300 |
fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */ |
3300 |
fault_around_bytes = PAGE_SIZE; /* rounddown_pow_of_two(0) is undefined */ |
| 3301 |
return 0; |
3301 |
return 0; |
| 3302 |
} |
3302 |
} |
| 3303 |
DEFINE_SIMPLE_ATTRIBUTE(fault_around_bytes_fops, |
3303 |
DEFINE_DEBUGFS_ATTRIBUTE(fault_around_bytes_fops, |
| 3304 |
fault_around_bytes_get, fault_around_bytes_set, "%llu\n"); |
3304 |
fault_around_bytes_get, fault_around_bytes_set, "%llu\n"); |
| 3305 |
|
3305 |
|
| 3306 |
static int __init fault_around_debugfs(void) |
3306 |
static int __init fault_around_debugfs(void) |
| 3307 |
{ |
3307 |
{ |
| 3308 |
void *ret; |
3308 |
void *ret; |
| 3309 |
|
3309 |
|
| 3310 |
ret = debugfs_create_file("fault_around_bytes", 0644, NULL, NULL, |
3310 |
ret = debugfs_create_file_unsafe("fault_around_bytes", 0644, NULL, NULL, |
| 3311 |
&fault_around_bytes_fops); |
3311 |
&fault_around_bytes_fops); |
| 3312 |
if (!ret) |
3312 |
if (!ret) |
| 3313 |
pr_warn("Failed to create fault_around_bytes in debugfs"); |
3313 |
pr_warn("Failed to create fault_around_bytes in debugfs"); |
| 3314 |
- |
|
|