[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1372119698-13147-2-git-send-email-davidlohr.bueso@hp.com>
Date: Mon, 24 Jun 2013 17:21:34 -0700
From: Davidlohr Bueso <davidlohr.bueso@...com>
To: mingo@...nel.org, akpm@...ux-foundation.org
Cc: walken@...gle.com, alex.shi@...el.com, tim.c.chen@...ux.intel.com,
a.p.zijlstra@...llo.nl, riel@...hat.com, peter@...leysoftware.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Davidlohr Bueso <davidlohr.bueso@...com>
Subject: [PATCH 1/5] mm,fs: introduce helpers around i_mmap_mutex
Various parts of the kernel acquire and release this mutex,
so add i_mmap_lock_write() and immap_unlock_write() helper
functions that will encapsulate this logic. The next patch
will make use of these.
Signed-off-by: Davidlohr Bueso <davidlohr.bueso@...com>
---
include/linux/fs.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 65c2be2..1ea6c68 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -475,6 +475,16 @@ struct block_device {
int mapping_tagged(struct address_space *mapping, int tag);
+static inline void i_mmap_lock_write(struct address_space *mapping)
+{
+ mutex_lock(&mapping->i_mmap_mutex);
+}
+
+static inline void i_mmap_unlock_write(struct address_space *mapping)
+{
+ mutex_unlock(&mapping->i_mmap_mutex);
+}
+
/*
* Might pages of this file be mapped into userspace?
*/
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists