mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-10 03:20:49 +00:00
Fix NULL pointer and various whitespace issues with DM's recent DAX code
changes from commit in 5.3 merge. -----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEJfWUX4UqZ4x1O2wixSPxCi2dA1oFAl1EUvUTHHNuaXR6ZXJA cmVkaGF0LmNvbQAKCRDFI/EKLZ0DWgj9B/0QQL8kB5DybBkADKAkmTw4pTtEqGSy LebPIGl45RHHgLcXB1J1cSGs6uA6AuNnn9XoFY7juEJthGp0IR+NgxKiq5r4UW2Q /k72a82D8T/FlBGet+5w44mKMARXiq5opdMS8iFezcd0c15IeNbbSmKZHluRppQX KsCKJ1FsZobXlUUMSeJFIS5eJNMaSg1isotcT8P6kWXsaNYziGul2Akjhxw8a2qZ kN6ATBKcvT4EOy/tDMFQhbFU6t5ydEH3buOZ1h8slCOSuzSzXuz56ff42dFYV8QK WzldzZ7PSSHqKn7SAKwRs4g/iEMotPk1ChsMSvDBVGs3VG3yACV0OCdB =KJ3q -----END PGP SIGNATURE----- Merge tag 'for-5.3/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: "Fix NULL pointer and various whitespace issues with DM's recent DAX code changes from commit in 5.3 merge" * tag 'for-5.3/dm-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm table: fix various whitespace issues with recent DAX code dm table: fix dax_dev NULL dereference in device_synchronous()
This commit is contained in:
commit
b2c742373d
@ -891,10 +891,10 @@ int device_supports_dax(struct dm_target *ti, struct dm_dev *dev,
|
||||
}
|
||||
|
||||
/* Check devices support synchronous DAX */
|
||||
static int device_synchronous(struct dm_target *ti, struct dm_dev *dev,
|
||||
static int device_dax_synchronous(struct dm_target *ti, struct dm_dev *dev,
|
||||
sector_t start, sector_t len, void *data)
|
||||
{
|
||||
return dax_synchronous(dev->dax_dev);
|
||||
return dev->dax_dev && dax_synchronous(dev->dax_dev);
|
||||
}
|
||||
|
||||
bool dm_table_supports_dax(struct dm_table *t,
|
||||
@ -1921,7 +1921,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
|
||||
|
||||
if (dm_table_supports_dax(t, device_supports_dax, &page_size)) {
|
||||
blk_queue_flag_set(QUEUE_FLAG_DAX, q);
|
||||
if (dm_table_supports_dax(t, device_synchronous, NULL))
|
||||
if (dm_table_supports_dax(t, device_dax_synchronous, NULL))
|
||||
set_dax_synchronous(t->md->dax_dev);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user