Skip to content

Commit

Permalink
dax/bus.c: don't use down_write_killable for non-user processes
Browse files Browse the repository at this point in the history
Change an instance of down_write_killable() to a simple down_write() where
there is no user process that might want to interrupt the operation.

Link: https://lkml.kernel.org/r/20240430-vv-dax_abi_fixes-v3-3-e3dcd755774c@intel.com
Fixes: c05ae9d ("dax/bus.c: replace driver-core lock usage by a local rwsem")
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Reported-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
stellarhopper authored and akpm00 committed May 7, 2024
1 parent 6f6544f commit e39dbcf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/dax/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1540,12 +1540,8 @@ static struct dev_dax *__devm_create_dev_dax(struct dev_dax_data *data)
struct dev_dax *devm_create_dev_dax(struct dev_dax_data *data)
{
struct dev_dax *dev_dax;
int rc;

rc = down_write_killable(&dax_region_rwsem);
if (rc)
return ERR_PTR(rc);

down_write(&dax_region_rwsem);
dev_dax = __devm_create_dev_dax(data);
up_write(&dax_region_rwsem);

Expand Down

0 comments on commit e39dbcf

Please sign in to comment.