Re: [PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
On 06/17/2014 23:50 PM, Greg KH wrote: > On Tue, Jun 17, 2014 at 10:56:04PM +0800, Jeff Liu wrote: >> >> On 06/17/2014 22:42 PM, James Bottomley wrote: >>> On Tue, 2014-06-17 at 22:25 +0800, Jeff Liu wrote: >>>> From: Jie Liu >>>> >>>

Re: [PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
On 06/17/2014 22:42 PM, James Bottomley wrote: > On Tue, 2014-06-17 at 22:25 +0800, Jeff Liu wrote: >> From: Jie Liu >> >> It's better to return the actual error rather than NULL because >> kset_register() can failed due to other reasons. >> >> Cc: Chris

[PATCH 10/24] drivers/base: return actual error on sysfs init

2014-06-17 Thread Jeff Liu
From: Jie Liu This patch fix all sysfs init functions under drivers core to return the actual error code than the hardcoded ENOMEM. Cc: Greg Kroah-Hartman Signed-off-by: Jie Liu --- drivers/base/bus.c | 16 drivers/base/class.c | 4 ++-- drivers/base/core.c | 4 ++-- 3

[PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
From: Jie Liu It's better to return the actual error rather than NULL because kset_register() can failed due to other reasons. Cc: Christoph Lameter Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Pekka Enberg Cc: Matt Mackall Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin

[PATCH 04/24] powerpc: check/return actual error on sysfs functions

2014-06-17 Thread Jeff Liu
From: Jie Liu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Jie Liu --- arch/powerpc/platforms/powernv/opal-dump.c | 2 +- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 09/24] drivers/iommu: check actual error on iommu_init

2014-06-17 Thread Jeff Liu
From: Jie Liu kset_create_and_add() has been fixed to return the actual error code ptr rather than NULL, so update iommu_init() to check the return value via IS_ERR() accordingly. Cc: Joerg Roedel Signed-off-by: Jie Liu --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 15/24] drivers/of: return actual error on of_init

2014-06-17 Thread Jeff Liu
From: Jie Liu Return the actual error code if call kset_create_and_add() failed Cc: Greg Kroah-Hartman Signed-off-by: Jie Liu --- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index 8368d96..8f8efa1 100644 ---

[PATCH 06/24] crypt: return actual error code on pcrypt_init

2014-06-17 Thread Jeff Liu
From: Jie Liu Return the actual error code if call kset_create_and_add() failed Cc: Herbert Xu Cc: David S. Miller" Signed-off-by: Jie Liu --- crypto/pcrypt.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index 309d345..053fb10

[PATCH 08/24] drivers/firmware: return actual error on sysfs init

2014-06-17 Thread Jeff Liu
From: Jie Liu This patch fix all sysfs init functions under firmware subsystems to return the actual error if call kset_create_and_add() failed. Cc: Stefan Richter Signed-off-by: Jie Liu --- drivers/firmware/dmi-sysfs.c | 4 +++- drivers/firmware/edd.c | 4 ++--

[PATCH 07/24] kernel: return actual error on param_sysfs_init

2014-06-17 Thread Jeff Liu
From: Jie Liu Return the actual error code if kset_create_and_add() failed Cc: Andrew Morton Cc: Christoph Lameter Signed-off-by: Jie Liu --- kernel/params.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index 1e52ca2..a110987

[patch 00/24] lib/kobject: kset_create_and_add return error clean up

2014-06-17 Thread Jeff Liu
fail due to other reasons, hence it's better to return the actual error on kset_create_and_add(), this patch series is just did that and this is inspired by Christoph in another thread: http://www.spinics.net/lists/linux-mm/msg74729.html Jeff Liu (24) kobject: return actual error

[PATCH 02/24] sample/kobject: update kset-example code

2014-06-17 Thread Jeff Liu
From: Jie Liu Subject: sample/kobject: update kset-example code Check and return the error ptr if call kset_create_and_add() failed Cc: Christoph Lameter Cc: Greg Kroah-Hartman Cc: Andrew Morton Signed-off-by: Jie Liu --- samples/kobject/kset-example.c | 4 ++-- 1 file changed, 2

[PATCH 02/24] sample/kobject: update kset-example code

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Subject: sample/kobject: update kset-example code Check and return the error ptr if call kset_create_and_add() failed Cc: Christoph Lameter c...@linux-foundation.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Andrew Morton a...@linux-foundation.org

[patch 00/24] lib/kobject: kset_create_and_add return error clean up

2014-06-17 Thread Jeff Liu
fail due to other reasons, hence it's better to return the actual error on kset_create_and_add(), this patch series is just did that and this is inspired by Christoph in another thread: http://www.spinics.net/lists/linux-mm/msg74729.html Jeff Liu (24) kobject: return actual error

[PATCH 07/24] kernel: return actual error on param_sysfs_init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Return the actual error code if kset_create_and_add() failed Cc: Andrew Morton a...@linux-foundation.org Cc: Christoph Lameter c...@linux-foundation.org Signed-off-by: Jie Liu jeff@oracle.com --- kernel/params.c | 7 +++ 1 file changed, 3 insertions(+),

[PATCH 08/24] drivers/firmware: return actual error on sysfs init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com This patch fix all sysfs init functions under firmware subsystems to return the actual error if call kset_create_and_add() failed. Cc: Stefan Richter stef...@s5r6.in-berlin.de Signed-off-by: Jie Liu jeff@oracle.com --- drivers/firmware/dmi-sysfs.c | 4

[PATCH 06/24] crypt: return actual error code on pcrypt_init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Return the actual error code if call kset_create_and_add() failed Cc: Herbert Xu herb...@gondor.apana.org.au Cc: David S. Miller da...@davemloft.net Signed-off-by: Jie Liu jeff@oracle.com --- crypto/pcrypt.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH 09/24] drivers/iommu: check actual error on iommu_init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com kset_create_and_add() has been fixed to return the actual error code ptr rather than NULL, so update iommu_init() to check the return value via IS_ERR() accordingly. Cc: Joerg Roedel j...@8bytes.org Signed-off-by: Jie Liu jeff@oracle.com ---

[PATCH 15/24] drivers/of: return actual error on of_init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Return the actual error code if call kset_create_and_add() failed Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Jie Liu jeff@oracle.com --- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 04/24] powerpc: check/return actual error on sysfs functions

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Signed-off-by: Jie Liu jeff@oracle.com --- arch/powerpc/platforms/powernv/opal-dump.c | 2 +- arch/powerpc/platforms/powernv/opal-elog.c | 4 ++-- 2 files changed, 3

[PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com It's better to return the actual error rather than NULL because kset_register() can failed due to other reasons. Cc: Christoph Lameter c...@linux-foundation.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Andrew Morton a...@linux-foundation.org Cc:

[PATCH 10/24] drivers/base: return actual error on sysfs init

2014-06-17 Thread Jeff Liu
From: Jie Liu jeff@oracle.com This patch fix all sysfs init functions under drivers core to return the actual error code than the hardcoded ENOMEM. Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Jie Liu jeff@oracle.com --- drivers/base/bus.c | 16

Re: [PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
On 06/17/2014 22:42 PM, James Bottomley wrote: On Tue, 2014-06-17 at 22:25 +0800, Jeff Liu wrote: From: Jie Liu jeff@oracle.com It's better to return the actual error rather than NULL because kset_register() can failed due to other reasons. Cc: Christoph Lameter c...@linux

Re: [PATCH 01/24] kobject: return actual error on kset_create_and_add

2014-06-17 Thread Jeff Liu
On 06/17/2014 23:50 PM, Greg KH wrote: On Tue, Jun 17, 2014 at 10:56:04PM +0800, Jeff Liu wrote: On 06/17/2014 22:42 PM, James Bottomley wrote: On Tue, 2014-06-17 at 22:25 +0800, Jeff Liu wrote: From: Jie Liu jeff@oracle.com It's better to return the actual error rather than NULL

Re: [Ocfs2-devel] [PATCH] fs: ocfs2: move_extents.c: Fix for possible null pointer dereference

2014-05-25 Thread Jeff Liu
Hi, On 05/23/2014 04:46 AM, Rickard Strandqvist wrote: > There is otherwise a risk of a possible null pointer dereference. > > Was largely found by using a static code analysis program called cppcheck. > > Signed-off-by: Rickard Strandqvist > --- > fs/ocfs2/move_extents.c |4 +++- > 1

Re: [Ocfs2-devel] [PATCH] fs: ocfs2: move_extents.c: Fix for possible null pointer dereference

2014-05-25 Thread Jeff Liu
Hi, On 05/23/2014 04:46 AM, Rickard Strandqvist wrote: There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se ---

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-22 Thread Jeff Liu
On 04/12 2014 22:36 PM, Brian Foster wrote: > On Mon, Apr 21, 2014 at 10:01:34PM +0800, Jeff Liu wrote: >> >> On 04/21 2014 21:09 PM, Brian Foster wrote: >>> On Mon, Apr 21, 2014 at 08:46:39PM +0800, Jeff Liu wrote: >>>> Hi Tuomas, >>>> >

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-22 Thread Jeff Liu
On 04/12 2014 22:36 PM, Brian Foster wrote: On Mon, Apr 21, 2014 at 10:01:34PM +0800, Jeff Liu wrote: On 04/21 2014 21:09 PM, Brian Foster wrote: On Mon, Apr 21, 2014 at 08:46:39PM +0800, Jeff Liu wrote: Hi Tuomas, On 04/21 2014 18:04 PM, Tuomas Tynkkynen wrote: xfs_{compat_

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-21 Thread Jeff Liu
On 04/21 2014 21:09 PM, Brian Foster wrote: > On Mon, Apr 21, 2014 at 08:46:39PM +0800, Jeff Liu wrote: >> Hi Tuomas, >> >> On 04/21 2014 18:04 PM, Tuomas Tynkkynen wrote: >>> xfs_{compat_,}attrmulti_by_handle could return an errno with incorrect >>> sig

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-21 Thread Jeff Liu
Hi Tuomas, On 04/21 2014 18:04 PM, Tuomas Tynkkynen wrote: > xfs_{compat_,}attrmulti_by_handle could return an errno with incorrect > sign in some cases. While at it, make sure ENOMEM is returned instead of > E2BIG if kmalloc fails. > > Signed-off-by: Tuomas Tynkkynen > --- > Compile tested

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-21 Thread Jeff Liu
Hi Tuomas, On 04/21 2014 18:04 PM, Tuomas Tynkkynen wrote: xfs_{compat_,}attrmulti_by_handle could return an errno with incorrect sign in some cases. While at it, make sure ENOMEM is returned instead of E2BIG if kmalloc fails. Signed-off-by: Tuomas Tynkkynen tuomas.tynkky...@iki.fi ---

Re: [PATCH] xfs: Fix wrong error codes being returned

2014-04-21 Thread Jeff Liu
On 04/21 2014 21:09 PM, Brian Foster wrote: On Mon, Apr 21, 2014 at 08:46:39PM +0800, Jeff Liu wrote: Hi Tuomas, On 04/21 2014 18:04 PM, Tuomas Tynkkynen wrote: xfs_{compat_,}attrmulti_by_handle could return an errno with incorrect sign in some cases. While at it, make sure ENOMEM

Re: [xfs] c91c46c12: xfstests generic/313 regression

2014-01-10 Thread Jeff Liu
On 01/10 2014 21:33 PM, Christoph Hellwig wrote: > On Fri, Jan 10, 2014 at 09:22:10PM +0800, Jeff Liu wrote: >> Hi Fengguang, >> >> Thanks for help catching up this. I think the below patch can fix it >> up, but maybe there would have a neater solution once Christoph is

Re: [xfs] c91c46c12: xfstests generic/313 regression

2014-01-10 Thread Jeff Liu
Hi Fengguang, Thanks for help catching up this. I think the below patch can fix it up, but maybe there would have a neater solution once Christoph is back. Thanks, -Jeff From: Jie Liu Subject: xfs: fix ctime and mtime update for truncate(2) There is a semantic difference between truncate(2)

Re: [xfs] c91c46c12: xfstests generic/313 regression

2014-01-10 Thread Jeff Liu
Hi Fengguang, Thanks for help catching up this. I think the below patch can fix it up, but maybe there would have a neater solution once Christoph is back. Thanks, -Jeff From: Jie Liu jeff@oracle.com Subject: xfs: fix ctime and mtime update for truncate(2) There is a semantic difference

Re: [xfs] c91c46c12: xfstests generic/313 regression

2014-01-10 Thread Jeff Liu
On 01/10 2014 21:33 PM, Christoph Hellwig wrote: On Fri, Jan 10, 2014 at 09:22:10PM +0800, Jeff Liu wrote: Hi Fengguang, Thanks for help catching up this. I think the below patch can fix it up, but maybe there would have a neater solution once Christoph is back. I'd just remove the mask

Re: [PATCH 2/3] xfs: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()

2014-01-07 Thread Jeff Liu
Hi Chuansheng, On 01/07 2014 16:53 PM, Chuansheng Liu wrote: > > In case CONFIG_DEBUG_OBJECTS_WORK is defined, it is needed to > call destroy_work_on_stack() which frees the debug object to pair > with INIT_WORK_ONSTACK(). > > Signed-off-by: Liu, Chuansheng > --- > fs/xfs/xfs_bmap_util.c |

Re: [PATCH 2/3] xfs: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()

2014-01-07 Thread Jeff Liu
Hi Chuansheng, On 01/07 2014 16:53 PM, Chuansheng Liu wrote: In case CONFIG_DEBUG_OBJECTS_WORK is defined, it is needed to call destroy_work_on_stack() which frees the debug object to pair with INIT_WORK_ONSTACK(). Signed-off-by: Liu, Chuansheng chuansheng@intel.com ---

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Jeff Liu
On 12/14 2013 00:32 AM, Christoph Hellwig wrote: >> +static inline prid_t xfs_get_initial_prid(struct xfs_inode *dp) >> +{ >> +if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) >> +return xfs_get_projid(dp); >> +else >> +return XFS_PROJID_DEFAULT; >> +} > > You could

Re: [PATCH 1/5] xfs: factor prid related codes into xfs_get_initial_prid()

2013-12-14 Thread Jeff Liu
On 12/14 2013 00:32 AM, Christoph Hellwig wrote: +static inline prid_t xfs_get_initial_prid(struct xfs_inode *dp) +{ +if (dp-i_d.di_flags XFS_DIFLAG_PROJINHERIT) +return xfs_get_projid(dp); +else +return XFS_PROJID_DEFAULT; +} You could skip the else

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

2013-11-17 Thread Jeff Liu
Hi Oleg, Sorry for my late response! On 11/16/2013 01:12 AM, Oleg Nesterov wrote: > 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 >>

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

2013-11-17 Thread Jeff Liu
Hi Oleg, Sorry for my late response! On 11/16/2013 01:12 AM, Oleg Nesterov wrote: 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

Re: [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, &

Re: [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

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

2013-11-14 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 > > Simplify the code in lmLogSync() via list_last_entry_or_null(). > > Signed-off-by: Jie Liu > --- > fs/jfs/jfs_logmgr.c | 10 +++--- > 1 fi

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

2013-11-14 Thread Jeff Liu
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 ---

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

2013-11-14 Thread Jeff Liu
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

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

2013-11-14 Thread Jeff Liu
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 ---

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

2013-11-14 Thread Jeff Liu
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 +++

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

2013-11-14 Thread Jeff Liu
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

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

2013-11-14 Thread Jeff Liu
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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

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

2013-11-14 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

Re: [PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2013-11-07 Thread Jeff Liu
Thanks for your prompt response! On 11/07/2013 01:13 PM, Stephan Mueller wrote: > Am Donnerstag, 7. November 2013, 12:14:17 schrieb Jeff Liu: > > Hi Jeff, > >> Hi Stephan, >> >> As per your previous comments for this fix, you have promised another >>

Re: [PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2013-11-07 Thread Jeff Liu
Thanks for your prompt response! On 11/07/2013 01:13 PM, Stephan Mueller wrote: Am Donnerstag, 7. November 2013, 12:14:17 schrieb Jeff Liu: Hi Jeff, Hi Stephan, As per your previous comments for this fix, you have promised another approach which is promising to avoid entropy starvation

Re: [PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2013-11-06 Thread Jeff Liu
Hi Stephan, As per your previous comments for this fix, you have promised another approach which is promising to avoid entropy starvation, I got this info from the following thread: [PATCH] avoid entropy starvation due to stack protection https://lkml.org/lkml/2012/12/14/267 My current fix has

Re: [PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2013-11-06 Thread Jeff Liu
Hi Stephan, As per your previous comments for this fix, you have promised another approach which is promising to avoid entropy starvation, I got this info from the following thread: [PATCH] avoid entropy starvation due to stack protection https://lkml.org/lkml/2012/12/14/267 My current fix has

Re: OCFS2: ocfs2_read_blocks:285 ERROR: block 532737 had the JBD bit set while I was in lock_buffer!

2013-09-03 Thread Jeff Liu
On 09/03/2013 02:42 PM, Richard Weinberger wrote: > Hi! > > Am 03.09.2013 05:17, schrieb Jeff Liu: >> Hello, >> >> It seems like Sunil has fixed a similar issue against ocfs2-1.4 >> several years ago: >> https://oss.oracle.com/gi

Re: OCFS2: ocfs2_read_blocks:285 ERROR: block 532737 had the JBD bit set while I was in lock_buffer!

2013-09-03 Thread Jeff Liu
On 09/03/2013 02:42 PM, Richard Weinberger wrote: Hi! Am 03.09.2013 05:17, schrieb Jeff Liu: Hello, It seems like Sunil has fixed a similar issue against ocfs2-1.4 several years ago: https://oss.oracle.com/git/?p=ocfs2-1.4.git;a=commitdiff_plain;h=2fd250839d0f5073af8d42e97f1db74beb621674

Re: OCFS2: ocfs2_read_blocks:285 ERROR: block 532737 had the JBD bit set while I was in lock_buffer!

2013-09-02 Thread Jeff Liu
Hello, It seems like Sunil has fixed a similar issue against ocfs2-1.4 several years ago: https://oss.oracle.com/git/?p=ocfs2-1.4.git;a=commitdiff_plain;h=2fd250839d0f5073af8d42e97f1db74beb621674;hp=e882faf84930431524f84598caea7d4e9a9529c5

Re: OCFS2: ocfs2_read_blocks:285 ERROR: block 532737 had the JBD bit set while I was in lock_buffer!

2013-09-02 Thread Jeff Liu
Hello, It seems like Sunil has fixed a similar issue against ocfs2-1.4 several years ago: https://oss.oracle.com/git/?p=ocfs2-1.4.git;a=commitdiff_plain;h=2fd250839d0f5073af8d42e97f1db74beb621674;hp=e882faf84930431524f84598caea7d4e9a9529c5

Re: [patch] xfs: check for underflow in xfs_iformat_fork()

2013-08-15 Thread Jeff Liu
On 08/15/2013 01:53 PM, Dan Carpenter wrote: > The "di_size" variable comes from the disk and it's a signed 64 bit. > We check the upper limit but we should check for negative numbers as > well. > > Signed-off-by: Dan Carpenter > > diff --git a/fs/xfs/xfs_inode_fork.c b/fs/xfs/xfs_inode_fork.c

Re: [patch] xfs: check for underflow in xfs_iformat_fork()

2013-08-15 Thread Jeff Liu
On 08/15/2013 01:53 PM, Dan Carpenter wrote: The di_size variable comes from the disk and it's a signed 64 bit. We check the upper limit but we should check for negative numbers as well. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/fs/xfs/xfs_inode_fork.c

Re: [PATCH v2] fs/ocfs2: use list_for_each_entry() instead of list_for_each()

2013-07-29 Thread Jeff Liu
Hi Dong, On 07/31/2013 12:00 AM, Dong Fang wrote: > On 07/29/2013 04:06 AM, Dan Carpenter wrote: >> Oh. It appears that nothing changed between v1 and v2. Only the CC >> list. >> >> It's probably that the list moderation on ocfs2-devel was confusing >> for non-native English speakers the patch

Re: [PATCH v2] fs/ocfs2: use list_for_each_entry() instead of list_for_each()

2013-07-29 Thread Jeff Liu
Hi Dong, On 07/31/2013 12:00 AM, Dong Fang wrote: On 07/29/2013 04:06 AM, Dan Carpenter wrote: Oh. It appears that nothing changed between v1 and v2. Only the CC list. It's probably that the list moderation on ocfs2-devel was confusing for non-native English speakers the patch submitter

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-17 Thread Jeff Liu
On 07/17/2013 06:58 PM, James Bottomley wrote: > On Wed, 2013-07-17 at 17:15 +0800, Jeff Liu wrote: >> On 07/17/2013 08:51 AM, Steven Rostedt wrote: >> >>> On Wed, 2013-07-17 at 08:32 +0800, Jeff Liu wrote: >>> >>>> Another thing might deviat

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-17 Thread Jeff Liu
On 07/17/2013 08:51 AM, Steven Rostedt wrote: > On Wed, 2013-07-17 at 08:32 +0800, Jeff Liu wrote: > >> Another thing might deviated from the main theme, but I'd like to raise it >> here because I would like to see what's the proper way for that. >> >> For instanc

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-17 Thread Jeff Liu
On 07/17/2013 08:51 AM, Steven Rostedt wrote: On Wed, 2013-07-17 at 08:32 +0800, Jeff Liu wrote: Another thing might deviated from the main theme, but I'd like to raise it here because I would like to see what's the proper way for that. For instance, people A posted a patch set

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-17 Thread Jeff Liu
On 07/17/2013 06:58 PM, James Bottomley wrote: On Wed, 2013-07-17 at 17:15 +0800, Jeff Liu wrote: On 07/17/2013 08:51 AM, Steven Rostedt wrote: On Wed, 2013-07-17 at 08:32 +0800, Jeff Liu wrote: Another thing might deviated from the main theme, but I'd like to raise it here because I would

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-16 Thread Jeff Liu
On 07/17/2013 07:12 AM, Sarah Sharp wrote: > On Tue, Jul 16, 2013 at 06:54:59PM -0400, Steven Rostedt wrote: >> On Tue, 2013-07-16 at 15:43 -0700, Sarah Sharp wrote: >> >>> Yes, that's true. Some kernel developers are better at moderating their >>> comments and tone towards individuals who are

Re: [Ksummit-2013-discuss] [ATTEND] How to act on LKML

2013-07-16 Thread Jeff Liu
On 07/17/2013 07:12 AM, Sarah Sharp wrote: On Tue, Jul 16, 2013 at 06:54:59PM -0400, Steven Rostedt wrote: On Tue, 2013-07-16 at 15:43 -0700, Sarah Sharp wrote: Yes, that's true. Some kernel developers are better at moderating their comments and tone towards individuals who are sensitive.

Re: [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup

2013-06-16 Thread Jeff Liu
On 06/16/2013 08:46 AM, Richard Yao wrote: > On 06/15/2013 01:09 AM, Jeff Liu wrote: >> [Add ocfs2-devel to CC-list] >> >> Hello Richard, >> >> Thanks for your patch. >> >> On 06/15/2013 03:23 AM, Richard Yao wrote: >> >>> There are

Re: [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup

2013-06-16 Thread Jeff Liu
On 06/16/2013 08:46 AM, Richard Yao wrote: On 06/15/2013 01:09 AM, Jeff Liu wrote: [Add ocfs2-devel to CC-list] Hello Richard, Thanks for your patch. On 06/15/2013 03:23 AM, Richard Yao wrote: There are multiple issues with the custom llseek implemented in ocfs2 for implementing

Re: [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup

2013-06-14 Thread Jeff Liu
ny of > the same flaws, which I caught during review. I addressed the issues > with his patch with one that I wrote. Since a small percentage of Gentoo > Linux users are affected by these flaws, I decided to adapt that code > that to btrfs (separate patch) and ocfs2. > > Note that

Re: [PATCH 1/2] ocfs2: Fix llseek() semantics and do some cleanup

2013-06-14 Thread Jeff Liu
a small percentage of Gentoo Linux users are affected by these flaws, I decided to adapt that code that to btrfs (separate patch) and ocfs2. Note that commit 48802c8ae2a9d618ec734a61283d645ad527e06c by Jeff Liu at Oracle mostly addressed #3 in btrfs. The only lingering issue was that the offset

Re: [RESEND] [PATCH] kernel/res_counter.c: remove useless return statement at res_counter_member()

2013-02-16 Thread Jeff Liu
Hi Andrew and David, On 02/15/2013 07:21 AM, Andrew Morton wrote: > On Sat, 02 Feb 2013 13:04:52 +0800 > Jeff Liu wrote: > >> The return statement after BUG() is invalid, move BUG() to the default >> choice of the switch. >> >> Signed-off-by: Jie Liu >&

Re: [RESEND] [PATCH] kernel/res_counter.c: remove useless return statement at res_counter_member()

2013-02-16 Thread Jeff Liu
Hi Andrew and David, On 02/15/2013 07:21 AM, Andrew Morton wrote: On Sat, 02 Feb 2013 13:04:52 +0800 Jeff Liu jeff@oracle.com wrote: The return statement after BUG() is invalid, move BUG() to the default choice of the switch. Signed-off-by: Jie Liu jeff@oracle.com --- kernel

[RESEND] [PATCH] kernel/res_counter.c: remove useless return statement at res_counter_member()

2013-02-01 Thread Jeff Liu
The return statement after BUG() is invalid, move BUG() to the default choice of the switch. Signed-off-by: Jie Liu --- kernel/res_counter.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/res_counter.c b/kernel/res_counter.c index ff55247..748a3bc 100644 ---

[RESEND] [PATCH] kernel/res_counter.c: remove useless return statement at res_counter_member()

2013-02-01 Thread Jeff Liu
The return statement after BUG() is invalid, move BUG() to the default choice of the switch. Signed-off-by: Jie Liu jeff@oracle.com --- kernel/res_counter.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/res_counter.c b/kernel/res_counter.c index

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strto

2013-01-11 Thread Jeff Liu
On 01/09/2013 10:04 PM, Abhijit Pawar wrote: > This patch replaces usages of obsolete simple_strtoul with kstrtoint in > xfs_args and suffix_strtoul. > > Signed-off-by: Abhijit Pawar > --- > fs/xfs/xfs_super.c | 29 +++-- > 1 files changed, 19 insertions(+), 10

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strto

2013-01-11 Thread Jeff Liu
On 01/12/2013 06:52 AM, Dave Chinner wrote: > On Fri, Jan 11, 2013 at 02:36:46PM +0800, Jeff Liu wrote: >> On 01/09/2013 10:04 PM, Abhijit Pawar wrote: >>> This patch replaces usages of obsolete simple_strtoul with kstrtoint in >>> xfs_args and suffix_strtoul. >>&

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strtofoo

2013-01-11 Thread Jeff Liu
On 01/12/2013 06:52 AM, Dave Chinner wrote: On Fri, Jan 11, 2013 at 02:36:46PM +0800, Jeff Liu wrote: On 01/09/2013 10:04 PM, Abhijit Pawar wrote: This patch replaces usages of obsolete simple_strtoul with kstrtoint in xfs_args and suffix_strtoul. Signed-off-by: Abhijit Pawar abhi.c.pa

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strtofoo

2013-01-11 Thread Jeff Liu
On 01/09/2013 10:04 PM, Abhijit Pawar wrote: This patch replaces usages of obsolete simple_strtoul with kstrtoint in xfs_args and suffix_strtoul. Signed-off-by: Abhijit Pawar abhi.c.pa...@gmail.com --- fs/xfs/xfs_super.c | 29 +++-- 1 files changed, 19

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strto

2013-01-10 Thread Jeff Liu
On 01/09/2013 10:04 PM, Abhijit Pawar wrote: > This patch replaces usages of obsolete simple_strtoul with kstrtoint in > xfs_args and suffix_strtoul. > > Signed-off-by: Abhijit Pawar > --- > fs/xfs/xfs_super.c | 29 +++-- > 1 files changed, 19 insertions(+), 10

Re: [PATCH 1/1] fs/xfs remove obsolete simple_strtofoo

2013-01-10 Thread Jeff Liu
On 01/09/2013 10:04 PM, Abhijit Pawar wrote: This patch replaces usages of obsolete simple_strtoul with kstrtoint in xfs_args and suffix_strtoul. Signed-off-by: Abhijit Pawar abhi.c.pa...@gmail.com --- fs/xfs/xfs_super.c | 29 +++-- 1 files changed, 19

Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)

2012-11-28 Thread Jeff Liu
On 11/29/2012 02:53 PM, Jim Meyering wrote: > Jeff Liu wrote: > >> On 11/29/2012 12:15 PM, Jim Meyering wrote: >>> Hugh Dickins wrote: >>>> On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: >>> ... >>>>> But this time in which scenario will use it

Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)

2012-11-28 Thread Jeff Liu
On 11/29/2012 12:15 PM, Jim Meyering wrote: > Hugh Dickins wrote: >> On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: > ... >>> But this time in which scenario will use it? >> >> I was not very convinced by the grep argument from Jim and Paul: >> that seemed to be grep holding on to a no-arbitrary-limits

Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)

2012-11-28 Thread Jeff Liu
On 11/29/2012 12:15 PM, Jim Meyering wrote: Hugh Dickins wrote: On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: ... But this time in which scenario will use it? I was not very convinced by the grep argument from Jim and Paul: that seemed to be grep holding on to a no-arbitrary-limits dogma, at

Re: [PATCH] tmpfs: support SEEK_DATA and SEEK_HOLE (reprise)

2012-11-28 Thread Jeff Liu
On 11/29/2012 02:53 PM, Jim Meyering wrote: Jeff Liu wrote: On 11/29/2012 12:15 PM, Jim Meyering wrote: Hugh Dickins wrote: On Thu, 29 Nov 2012, Jaegeuk Hanse wrote: ... But this time in which scenario will use it? I was not very convinced by the grep argument from Jim and Paul

[PATCH] Documentation/cgroups/blkio-controller.txt: s/disk_time|disk_sectors/time|sectors/

2012-11-17 Thread Jeff Liu
Hello, For blkio controller of cgroup, both disk_time and disk_sectors were obsolated file names. Now we're using blkio.time and blkio.sectors to examine how much disk time each cgroup got and how many sectors each cgroup dispatched separately. This patch fix the document to reflect those

[PATCH] Documentation/cgroups/blkio-controller.txt: s/disk_time|disk_sectors/time|sectors/

2012-11-17 Thread Jeff Liu
Hello, For blkio controller of cgroup, both disk_time and disk_sectors were obsolated file names. Now we're using blkio.time and blkio.sectors to examine how much disk time each cgroup got and how many sectors each cgroup dispatched separately. This patch fix the document to reflect those

[PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2012-11-14 Thread Jeff Liu
Hello, The problems have been fixed in this version as per Kees's comments for v3. Hi Kees, Would you please ACK this patch if you think it is ok except the strength of these various RNGs you are concerned? Changes: v4->v3: - s/random_stack_user()/get_atrandom_bytes()/ - Move this

[PATCH v4] binfmt_elf.c: use get_random_int() to fix entropy depleting

2012-11-14 Thread Jeff Liu
Hello, The problems have been fixed in this version as per Kees's comments for v3. Hi Kees, Would you please ACK this patch if you think it is ok except the strength of these various RNGs you are concerned? Changes: v4-v3: - s/random_stack_user()/get_atrandom_bytes()/ - Move this

  1   2   >