From: Miklos Szeredi Needed by fuse writepage. Signed-off-by: Miklos Szeredi --- Index: linux/include/linux/rwsem.h =================================================================== --- linux.orig/include/linux/rwsem.h 2007-02-27 14:40:55.000000000 +0100 +++ linux/include/linux/rwsem.h 2007-02-27 14:41:09.000000000 +0100 @@ -82,11 +82,13 @@ extern void down_write_nested(struct rw_ * proper abstraction for this case is completions. ] */ extern void down_read_non_owner(struct rw_semaphore *sem); +extern int down_read_trylock_non_owner(struct rw_semaphore *sem); extern void up_read_non_owner(struct rw_semaphore *sem); #else # define down_read_nested(sem, subclass) down_read(sem) # define down_write_nested(sem, subclass) down_write(sem) # define down_read_non_owner(sem) down_read(sem) +# define down_read_trylock_non_owner(sem) down_read_trylock(sem) # define up_read_non_owner(sem) up_read(sem) #endif Index: linux/kernel/rwsem.c =================================================================== --- linux.orig/kernel/rwsem.c 2007-02-27 14:40:55.000000000 +0100 +++ linux/kernel/rwsem.c 2007-02-27 14:41:09.000000000 +0100 @@ -125,6 +125,13 @@ void down_read_non_owner(struct rw_semap EXPORT_SYMBOL(down_read_non_owner); +int down_read_trylock_non_owner(struct rw_semaphore *sem) +{ + return __down_read_trylock(sem); +} + +EXPORT_SYMBOL(down_read_trylock_non_owner); + void down_write_nested(struct rw_semaphore *sem, int subclass) { might_sleep(); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/