提交 a3227fb9 编写于 作者: L Lachlan McIlroy 提交者: Tim Shimmin

[XFS] mraccessf & mrupdatef are supposed to be the "flags" versions of the

functions, but they

a) ignore the flags parameter completely, and b) are never called
directly, only via the flag-less defines anyway

So, drop the #define indirection, and rename mraccessf to mraccess, etc.

SGI-PV: 959138
SGI-Modid: xfs-linux-melb:xfs-kern:27711a
Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
Signed-off-by: NTim Shimmin <tes@sgi.com>
上级 1f9b3b64
...@@ -31,15 +31,13 @@ typedef struct { ...@@ -31,15 +31,13 @@ typedef struct {
do { (mrp)->mr_writer = 0; init_rwsem(&(mrp)->mr_lock); } while (0) do { (mrp)->mr_writer = 0; init_rwsem(&(mrp)->mr_lock); } while (0)
#define mrlock_init(mrp, t,n,s) mrinit(mrp, n) #define mrlock_init(mrp, t,n,s) mrinit(mrp, n)
#define mrfree(mrp) do { } while (0) #define mrfree(mrp) do { } while (0)
#define mraccess(mrp) mraccessf(mrp, 0)
#define mrupdate(mrp) mrupdatef(mrp, 0)
static inline void mraccessf(mrlock_t *mrp, int flags) static inline void mraccess(mrlock_t *mrp)
{ {
down_read(&mrp->mr_lock); down_read(&mrp->mr_lock);
} }
static inline void mrupdatef(mrlock_t *mrp, int flags) static inline void mrupdate(mrlock_t *mrp)
{ {
down_write(&mrp->mr_lock); down_write(&mrp->mr_lock);
mrp->mr_writer = 1; mrp->mr_writer = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册