X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Flibcfs%2Ffail.c;h=c77ea0a179962783882f0cfc47b7bec73772ffbd;hb=809d46b65bcd1cbca5b75b3c5736d85c77afa225;hp=46531078208e0381628fa3d8da99f0ec0f799542;hpb=65701b4a30efdb695776bcf690a2b3cabc928da1;p=fs%2Flustre-release.git diff --git a/libcfs/libcfs/fail.c b/libcfs/libcfs/fail.c index 4653107..c77ea0a 100644 --- a/libcfs/libcfs/fail.c +++ b/libcfs/libcfs/fail.c @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +26,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Whamcloud, Inc. + * Copyright (c) 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -87,7 +85,7 @@ int __cfs_fail_check_set(__u32 id, __u32 value, int set) int count = cfs_atomic_inc_return(&cfs_fail_count); if (count >= cfs_fail_val) { - cfs_set_bit(CFS_FAIL_ONCE_BIT, &cfs_fail_loc); + set_bit(CFS_FAIL_ONCE_BIT, &cfs_fail_loc); cfs_atomic_set(&cfs_fail_count, 0); /* we are lost race to increase */ if (count > cfs_fail_val) @@ -97,9 +95,9 @@ int __cfs_fail_check_set(__u32 id, __u32 value, int set) if ((set == CFS_FAIL_LOC_ORSET || set == CFS_FAIL_LOC_RESET) && (value & CFS_FAIL_ONCE)) - cfs_set_bit(CFS_FAIL_ONCE_BIT, &cfs_fail_loc); + set_bit(CFS_FAIL_ONCE_BIT, &cfs_fail_loc); /* Lost race to set CFS_FAILED_BIT. */ - if (cfs_test_and_set_bit(CFS_FAILED_BIT, &cfs_fail_loc)) { + if (test_and_set_bit(CFS_FAILED_BIT, &cfs_fail_loc)) { /* If CFS_FAIL_ONCE is valid, only one process can fail, * otherwise multi-process can fail at the same time. */ if (cfs_fail_loc & CFS_FAIL_ONCE)