From: Jie Liu
Simplify the code in current_tail() via list_last_entry_or_null().
Signed-off-by: Jie Liu
---
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 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2
From: Jie Liu
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
---
fs/xfs/xfs_trans_ail.c | 14 --
fs/xfs/xfs_trans_priv.h | 12
2 files changed, 12 insertions(+)
From: Jie Liu
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
---
include/linux/list.h | 11 +++
1 file changed, 11 insertions(+)
diff --git a/include/linux/list.h b/include/linux/list.h
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 xfs
From: Jie Liu
Simplify the code in lmLogSync() via list_last_entry_or_null().
Signed-off-by: Jie Liu
---
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 7b565d0..2f90779 100644
--- a/fs/jfs/jfs_l
From: Jie Liu
Simplify the code in drop_last_node() via list_last_entry_or_null().
Signed-off-by: Jie Liu
---
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 065096e..e46c394 100644
--- a/fs/ubifs/r
Hi Dave and all,
Please ignore this patch from this series.
On 11/15 2013 12:35 PM, Jeff Liu wrote:
> From: Jie Liu
>
> Simplify the code in lmLogSync() via list_last_entry_or_null().
>
> Signed-off-by: Jie Liu
> ---
> fs/jfs/jfs_logmgr.c | 10 +++---
> 1 file changed, 3 insertions(+), 7
From: Jie Liu
Simplify the code in lmNextPage via list_last_entry_or_null().
Signed-off-by: Jie Liu
---
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 360d27c..7b565d0 100644
--- a/fs/jfs/jfs_logmgr.c
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 wit
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 i
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
On 11/15, Jeff Liu wrote:
>
> @@ -441,13 +441,9 @@ static unsigned int current_tail(struct gfs2_sbd *sdp)
>
> spin_lock(&sdp->sd_ail_lock);
>
> - if (list_empty(&sdp->sd_ail1_list)) {
> - tail = sdp->sd_log_head;
> - } else {
> - tr = list_entry(sdp->sd_ail
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
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:
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] http://www.redhat.com/archives/cluster-devel/2013-
15 matches
Mail list logo