Unionfs: cleaner support for RT patches
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 22 Nov 2007 02:55:53 +0000 (21:55 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:21 +0000 (19:03 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/union.h

index 8dbf79a9e9d1e00a89fa18bb5863f128dc668f2c..7e75a39b4e50f9fa2ec962748c74b5754a2b66a1 100644 (file)
@@ -88,6 +88,13 @@ extern struct export_operations unionfs_export_ops;
 #define init_export_op(sb)     do {} while (0)
 #endif /* not (CONFIG_EXPORTFS || CONFIG_EXPORTFS_MODULE) */
 
+/* compatibility with Real-Time patches */
+#ifdef CONFIG_PREEMPT_RT
+# define unionfs_rw_semaphore  compat_rw_semaphore
+#else /* not CONFIG_PREEMPT_RT */
+# define unionfs_rw_semaphore  rw_semaphore
+#endif /* not CONFIG_PREEMPT_RT */
+
 /* file private data. */
 struct unionfs_file_info {
        int bstart;
@@ -187,11 +194,7 @@ struct unionfs_sb_info {
         * branch-management is used on a pivot_root'ed union, because we
         * have to ->lookup paths which belong to the same union.
         */
-#ifdef CONFIG_PREEMPT_RT
-       struct compat_rw_semaphore rwsem;
-#else /* not CONFIG_PREEMPT_RT */
-       struct rw_semaphore rwsem;
-#endif /* not CONFIG_PREEMPT_RT */
+       struct unionfs_rw_semaphore rwsem;
        pid_t write_lock_owner; /* PID of rw_sem owner (write lock) */
        int high_branch_id;     /* last unique branch ID given */
        struct odf_sb_info odf;