]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv/dump: Handle multiple writes to ack attribute
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>
Sat, 17 Oct 2020 16:42:36 +0000 (22:12 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 19 Oct 2020 11:58:52 +0000 (22:58 +1100)
commita25896f5fad22af83590faa22b19b8e39eb795b6
treeca31d08756cbeee6fb850bdc0c97a5b6c6c108e5
parentb4b358924091e40a047d7f9dea9ada3be551b0f6
powerpc/powernv/dump: Handle multiple writes to ack attribute

Even though we use self removing sysfs helper, we still need
to make sure we do the final kobject delete conditionally.
sysfs_remove_file_self() will handle parallel calls to remove
the sysfs attribute file and returns true only in the caller
that removed the attribute file. The other parallel callers
are returned false. Do the final kobject delete checking
the return value of sysfs_remove_file_self().

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201017164236.264713-1-hegdevasant@linux.vnet.ibm.com
arch/powerpc/platforms/powernv/opal-dump.c