Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1603067
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.in-chemnitz.de!news2.arglkargh.de!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Huang, Ying" <ying.huang@intel.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/5] mm, swap: Improve readability via make spin_lock/unlock balanced |
| Date | Fri, 17 Mar 2017 07:50:01 +0100 |
| Message-ID | <tlTS1-20n-7@gated-at.bofh.it> (permalink) |
| References | <tlTS1-20n-9@gated-at.bofh.it> |
| X-Original-To | Andrew Morton <akpm@linux-foundation.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1489733382; x=1521269382; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Chuyy09Z4Wmr/0SL/sQgk6MFkngJdQc2aymzcuL46+E=; b=aDHI6T2Z/3aTT7KHh9/7hDYc/rfPxu7l5jqpqAgtrRtrK9wno51/WhVJ dmn8QY22wHIH7K72IyeB6qcCiVAYmA==; |
| X-Extloop1 | 1 |
| X-Ironport-Av | E=Sophos;i="5.36,175,1486454400"; d="scan'208";a="945346638" |
| X-Mailer | git-send-email 2.11.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 29 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Andi Kleen <ak@linux.intel.com>, Dave Hansen <dave.hansen@linux.intel.com>, Shaohua Li <shli@kernel.org>, Rik van Riel <riel@redhat.com>, Huang Ying <ying.huang@intel.com>, Tim Chen <tim.c.chen@linux.intel.com>, Michal Hocko <mhocko@suse.com>, Hugh Dickins <hughd@google.com>, Vegard Nossum <vegard.nossum@oracle.com>, Ingo Molnar <mingo@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Fri, 17 Mar 2017 14:46:20 +0800 |
| X-Original-Message-ID | <20170317064635.12792-2-ying.huang@intel.com> |
| X-Original-References | <20170317064635.12792-1-ying.huang@intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1603067 |
Show key headers only | View raw
From: Huang Ying <ying.huang@intel.com> This is just a cleanup patch, no functionality change. In cluster_list_add_tail(), spin_lock_nested() is used to lock the cluster, while unlock_cluster() is used to unlock the cluster. To improve the code readability. Use spin_unlock() directly to unlock the cluster. Signed-off-by: "Huang, Ying" <ying.huang@intel.com> Acked-by: Tim Chen <tim.c.chen@intel.com> --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 6b6bb1bb6209..42fd620dcf4c 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -335,7 +335,7 @@ static void cluster_list_add_tail(struct swap_cluster_list *list, ci_tail = ci + tail; spin_lock_nested(&ci_tail->lock, SINGLE_DEPTH_NESTING); cluster_set_next(ci_tail, idx); - unlock_cluster(ci_tail); + spin_unlock(&ci_tail->lock); cluster_set_next_flag(&list->tail, idx, 0); } } -- 2.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 2/5] mm, swap: Improve readability via make spin_lock/unlock balanced "Huang, Ying" <ying.huang@intel.com> - 2017-03-17 07:50 +0100
csiph-web