[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
794ee1baee
commit
1b1dcc1b57
@ -152,7 +152,7 @@ typedef enum {
|
||||
|
||||
#define DM_FLAGS_NDELAY 0x001 /* return EAGAIN after dm_pending() */
|
||||
#define DM_FLAGS_UNWANTED 0x002 /* event not in fsys dm_eventset_t */
|
||||
#define DM_FLAGS_ISEM 0x004 /* thread holds i_sem */
|
||||
#define DM_FLAGS_IMUX 0x004 /* thread holds i_mutex */
|
||||
#define DM_FLAGS_IALLOCSEM_RD 0x010 /* thread holds i_alloc_sem rd */
|
||||
#define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */
|
||||
|
||||
@ -161,21 +161,21 @@ typedef enum {
|
||||
*/
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
|
||||
#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \
|
||||
DM_FLAGS_ISEM : 0)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM)
|
||||
DM_FLAGS_IMUX : 0)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX)
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \
|
||||
(LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22))
|
||||
#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \
|
||||
DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_ISEM)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM)
|
||||
DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_IMUX)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX)
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21)
|
||||
#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \
|
||||
0 : DM_FLAGS_ISEM)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_ISEM)
|
||||
0 : DM_FLAGS_IMUX)
|
||||
#define DM_SEM_FLAG_WR (DM_FLAGS_IMUX)
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user