[Cluster-devel] [PATCH 3/6] gfs2: simplify current_tail() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Simplify the code in current_tail() via list_last_entry_or_null(). Signed-off-by: Jie Liu jeff@oracle.com --- fs/gfs2/log.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 610613f..555f767

[Cluster-devel] [PATCH 2/6] xfs: simplify xfs_ail_max() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Simplify xfs_ail_max() with list_last_entry_or_null(), and move it to xfs_trans_priv.h as an inline function as now it is one line. Signed-off-by: Jie Liu jeff@oracle.com --- fs/xfs/xfs_trans_ail.c | 14 -- fs/xfs/xfs_trans_priv.h | 12

[Cluster-devel] [PATCH 1/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Introduce a trivial helper list_last_entry_or_null() to fetch the last entry from a list, return NULL if the list is empty. Signed-off-by: Jie Liu jeff@oracle.com --- include/linux/list.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[Cluster-devel] [PATCH 0/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
Hi Folks, This patch is trying to introduce a new list helper to retrieve the last entry or return NULL if the list is empty corresponding to it, which is inspired by Jiri Pirko's list_first_entry_or_null(). With this trivial helper, we could get a little benefit to simplify the code logic of

[Cluster-devel] [PATCH 6/6] jfs: simplify lmLogSync() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Simplify the code in lmLogSync() via list_last_entry_or_null(). Signed-off-by: Jie Liu jeff@oracle.com --- fs/jfs/jfs_logmgr.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index

[Cluster-devel] [PATCH 4/6] ubifs: simplify drop_last_node() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Simplify the code in drop_last_node() via list_last_entry_or_null(). Signed-off-by: Jie Liu jeff@oracle.com --- fs/ubifs/recovery.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index

Re: [Cluster-devel] [PATCH 6/6] jfs: simplify lmLogSync() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
Hi Dave and all, Please ignore this patch from this series. On 11/15 2013 12:35 PM, Jeff Liu wrote: From: Jie Liu jeff@oracle.com Simplify the code in lmLogSync() via list_last_entry_or_null(). Signed-off-by: Jie Liu jeff@oracle.com --- fs/jfs/jfs_logmgr.c | 10 +++--- 1

[Cluster-devel] [PATCH 5/6] jfs: simplify lmNextPage() via list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Simplify the code in lmNextPage via list_last_entry_or_null(). Signed-off-by: Jie Liu jeff@oracle.com --- fs/jfs/jfs_logmgr.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index

Re: [Cluster-devel] [PATCH 0/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Christoph Hellwig
On Fri, Nov 15, 2013 at 12:29:48PM +0800, Jeff Liu wrote: Hi Folks, This patch is trying to introduce a new list helper to retrieve the last entry or return NULL if the list is empty corresponding to it, which is inspired by Jiri Pirko's list_first_entry_or_null(). How did we end up with

Re: [Cluster-devel] [PATCH 0/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Steven Whitehouse
Hi, On Fri, 2013-11-15 at 06:11 -0800, Christoph Hellwig wrote: On Fri, Nov 15, 2013 at 12:29:48PM +0800, Jeff Liu wrote: Hi Folks, This patch is trying to introduce a new list helper to retrieve the last entry or return NULL if the list is empty corresponding to it, which is inspired

Re: [Cluster-devel] [PATCH 0/6] list: introduce list_last_entry_or_null()

2013-11-15 Thread Jeff Liu
On 11/15 2013 22:11, Christoph Hellwig wrote: On Fri, Nov 15, 2013 at 12:29:48PM +0800, Jeff Liu wrote: Hi Folks, This patch is trying to introduce a new list helper to retrieve the last entry or return NULL if the list is empty corresponding to it, which is inspired by Jiri Pirko's

[Cluster-devel] introduce list_get_first/last (Was: [PATCH 3/6] gfs2: simplify current_tail() via list_last_entry_or_null())

2013-11-15 Thread Oleg Nesterov
On 11/15, Oleg Nesterov wrote: But probably list_last_entry() makes sense in the else branch, athough this is minor. Off-topic. Not sure this really makes sense, but I was thinking about list_get_first(pos, head, member) \ ((pos) = list_first_entry(head,

[Cluster-devel] [cluster.git][PATCH] rng: enforce unfence action to always be on convention

2013-11-15 Thread Jan Pokorný
There a silent agreement on this probably since beginning already (cf. [1]). Enforce it to move a boundary of what it explicitly wrong a bit futher. Counterpart changeset for fence-agents (relevant branch) will follow. [1] https://bugzilla.redhat.com/show_bug.cgi?id=865161#c17 Signed-off-by:

[Cluster-devel] [fence-agents.git][PATCH] rng: enforce unfence action to always be on convention (FA part)

2013-11-15 Thread Jan Pokorný
There is a silent agreement on this probably since beginning already (cf. [1]). Enforce it to move a boundary of what is explicitly wrong a bit further. Counterpart change for [2]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=865161#c17 [2]