[patch 15/22] add non-owner variant of down_read_trylock()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Miklos Szeredi <mszeredi@xxxxxxx>

Needed by fuse writepage.

Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxx>
---

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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux