From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Oren Laadan <orenl@cs.columbia.edu>
Cc: Serge Hallyn <serge@hallyn.com>,
Matt Helsley <matthltc@us.ibm.com>, Dan Smith <danms@us.ibm.com>,
Matthew Wilcox <matthew@wil.cx>,
Jamie Lokier <jamie@shareable.org>,
Steven Whitehouse <swhiteho@redhat.com>,
<linux-fsdevel@vger.kernel.org>,
Containers <containers@lists.linux-foundation.org>
Subject: [PATCH 1/5][v5][cr]: Move file_lock macros into linux/fs.h
Date: Thu, 28 Oct 2010 23:16:37 -0700 [thread overview]
Message-ID: <1288333001-28838-2-git-send-email-sukadev@linux.vnet.ibm.com> (raw)
In-Reply-To: <1288333001-28838-1-git-send-email-sukadev@linux.vnet.ibm.com>
Move IS_POSIX(), IS_FLOCK(), IS_LEASE() and 'for_each_lock()' into
include/linux/fs.h since these are also needed to checkpoint/restart
file-locks.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
---
fs/locks.c | 7 -------
include/linux/fs.h | 7 +++++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 9cd859e..da53795 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -130,16 +130,9 @@
#include <asm/uaccess.h>
-#define IS_POSIX(fl) (fl->fl_flags & FL_POSIX)
-#define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK)
-#define IS_LEASE(fl) (fl->fl_flags & FL_LEASE)
-
int leases_enable = 1;
int lease_break_time = 45;
-#define for_each_lock(inode, lockp) \
- for (lockp = &inode->i_flock; *lockp != NULL; lockp = &(*lockp)->fl_next)
-
static LIST_HEAD(file_lock_list);
static LIST_HEAD(blocked_list);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ee725ff..909a535 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1088,6 +1088,13 @@ struct file_lock {
} fl_u;
};
+#define IS_POSIX(fl) (fl->fl_flags & FL_POSIX)
+#define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK)
+#define IS_LEASE(fl) (fl->fl_flags & FL_LEASE)
+
+#define for_each_lock(inode, lockp) \
+ for (lockp = &inode->i_flock; *lockp != NULL; lockp = &(*lockp)->fl_next)
+
/* The following constant reflects the upper bound of the file/locking space */
#ifndef OFFSET_MAX
#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1)))
--
1.6.0.4
next prev parent reply other threads:[~2010-10-29 6:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 6:16 [PATCH 0/5][v5][cr] Checkpoint/restart file locks Sukadev Bhattiprolu
2010-10-29 6:16 ` Sukadev Bhattiprolu [this message]
2010-10-29 6:16 ` [PATCH 2/5][v5][cr]: Define flock_set() Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 3/5][v5][cr]: Define flock64_set() Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 4/5][v5][cr]: Checkpoint/restore file-locks Sukadev Bhattiprolu
2010-10-29 6:16 ` [PATCH 5/5][v5][cr]: Document design of C/R of file-locks Sukadev Bhattiprolu
2010-10-29 14:31 ` [PATCH 0/5][v5][cr] Checkpoint/restart file locks Lin Ming
2010-10-29 18:35 ` Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288333001-28838-2-git-send-email-sukadev@linux.vnet.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=danms@us.ibm.com \
--cc=jamie@shareable.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=matthltc@us.ibm.com \
--cc=orenl@cs.columbia.edu \
--cc=serge@hallyn.com \
--cc=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).