Please sign in to comment.
Linux 5.2 compat: rwsem_tryupgrade()
Commit torvalds/linux@46ad084 has removed the architecture specific rwsem source and headers leaving only the generic version. As part of this change the RWSEM_ACTIVE_READ_BIAS and RWSEM_ACTIVE_WRITE_BIAS macros were moved to the private kernel/locking/rwsem.h header. This results in a build failure because these macros were required to implement the rwsem_tryupgrade() compatibility function. In practice, this isn't a major problem because there are no longer any consumers of rwsem_tryupgrade() in the code base. So we could remove this functionality entirely. However, since there may still be external consumers thit commit instead updates the code to provide a version of rwsem_tryupgrade() which always fails to upgrade the rwsem. This is safe because any consumer of this interface is expected to fallback to rwsem_enter(). That said, the rwsem_tryupgrade() compatibility function should be removed in a future release. Signed-off-by: Brian Behlendorf <email@example.com>
- Loading branch information...
Showing with 10 additions and 2 deletions.