Whamcloud - gitweb
LU-4423 lustre: don't declare extern variables in C files.
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_iam.h
index 40c528b..23cd286 100644 (file)
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * version 2 along with this program; If not, see
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -1038,7 +1034,7 @@ static inline void iam_lock_bh(struct buffer_head volatile *bh)
 {
         DX_DEVAL(iam_lock_stats.dls_bh_lock++);
 #ifdef CONFIG_SMP
-       while (test_and_set_bit(BH_DXLock, &bh->b_state)) {
+       while (test_and_set_bit_lock(BH_DXLock, &bh->b_state)) {
                DX_DEVAL(iam_lock_stats.dls_bh_busy++);
                while (test_bit(BH_DXLock, &bh->b_state))
                         cpu_relax();
@@ -1049,8 +1045,7 @@ static inline void iam_lock_bh(struct buffer_head volatile *bh)
 static inline void iam_unlock_bh(struct buffer_head *bh)
 {
 #ifdef CONFIG_SMP
-        smp_mb__before_clear_bit();
-        clear_bit(BH_DXLock, &bh->b_state);
+       clear_bit_unlock(BH_DXLock, &bh->b_state);
 #endif
 }
 
@@ -1117,6 +1112,7 @@ int iam_uapi_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
 extern int ldiskfs_check_dir_entry(const char *, struct inode *,
                                 struct ldiskfs_dir_entry_2 *,
                                 struct buffer_head *, unsigned long);
+extern int dx_node_check(struct iam_path *p, struct iam_frame *f);
 #else
 static inline int ldiskfs_check_dir_entry(const char * function,
                                        struct inode * dir,