Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932398AbcJTXc0 (ORCPT ); Thu, 20 Oct 2016 19:32:26 -0400 Received: from mga05.intel.com ([192.55.52.43]:50075 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756623AbcJTXcZ (ORCPT ); Thu, 20 Oct 2016 19:32:25 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,521,1473145200"; d="scan'208";a="1056877378" From: Tim Chen To: Andrew Morton Cc: "Huang, Ying" , dave.hansen@intel.com, ak@linux.intel.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hugh Dickins , Shaohua Li , Minchan Kim , Rik van Riel , Andrea Arcangeli , "Kirill A . Shutemov" , Vladimir Davydov , Johannes Weiner , Michal Hocko , Hillf Danton , Tim Chen Subject: [PATCH v2 1/8] mm/swap: Fix kernel message in swap_info_get() Date: Thu, 20 Oct 2016 16:31:40 -0700 Message-Id: X-Mailer: git-send-email 2.5.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 41 From: "Huang, Ying" swap_info_get() is used not only in swap free code path but also in page_swapcount(), etc. So the original kernel message in swap_info_get() is not correct now. Fix it via replacing "swap_free" to "swap_info_get" in the message. Signed-off-by: "Huang, Ying" Signed-off-by: Tim Chen Reviewed-by: Rik van Riel --- mm/swapfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 2210de2..b745d3d 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -753,16 +753,16 @@ static struct swap_info_struct *swap_info_get(swp_entry_t entry) return p; bad_free: - pr_err("swap_free: %s%08lx\n", Unused_offset, entry.val); + pr_err("swap_info_get: %s%08lx\n", Unused_offset, entry.val); goto out; bad_offset: - pr_err("swap_free: %s%08lx\n", Bad_offset, entry.val); + pr_err("swap_info_get: %s%08lx\n", Bad_offset, entry.val); goto out; bad_device: - pr_err("swap_free: %s%08lx\n", Unused_file, entry.val); + pr_err("swap_info_get: %s%08lx\n", Unused_file, entry.val); goto out; bad_nofile: - pr_err("swap_free: %s%08lx\n", Bad_file, entry.val); + pr_err("swap_info_get: %s%08lx\n", Bad_file, entry.val); out: return NULL; } -- 2.5.5