Re: [f2fs-dev] [patch] f2fs: dereferencing an ERR_PTR

2013-05-23 Thread Jaegeuk Kim
2013-05-23 (목), 13:12 +0300, Dan Carpenter: > Btw, Linus's new Sparse changes don't like the f2fs's NEW_ADDR > macro. > > #define NEW_ADDR-1U > > We use it like this: > > block_t src, dest; > > if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) { > > block_t

Re: [f2fs-dev] [PATCH 3/4] f2fs: return proper error from start_gc_thread

2013-05-23 Thread Namjae Jeon
2013/5/23, Jason Hrycay : > On 5/23/2013 8:58 AM, Namjae Jeon wrote: >> From: Namjae Jeon >> >> when there is an error from kthread_run, then return proper error >> rather than returning -ENOMEM. >> >> Signed-off-by: Namjae Jeon >> Signed-off-by: Amit Sahrawat >> --- >> fs/f2fs/gc.c |2 +- >

Re: [f2fs-dev] [PATCH 3/4] f2fs: return proper error from start_gc_thread

2013-05-23 Thread Jason Hrycay
On 5/23/2013 8:58 AM, Namjae Jeon wrote: > From: Namjae Jeon > > when there is an error from kthread_run, then return proper error > rather than returning -ENOMEM. > > Signed-off-by: Namjae Jeon > Signed-off-by: Amit Sahrawat > --- > fs/f2fs/gc.c |2 +- > 1 file changed, 1 insertion(+), 1

[f2fs-dev] [PATCH 4/4] f2fs: optimize several routines in node.h

2013-05-23 Thread Namjae Jeon
From: Namjae Jeon There are various functions with common code which could be separated out to make common routines. So, made new routines and in order to retain the same call path and no major changes, written some macros to access those routines. Signed-off-by: Namjae Jeon Signed-off-by: Amit

[f2fs-dev] [PATCH 3/4] f2fs: return proper error from start_gc_thread

2013-05-23 Thread Namjae Jeon
From: Namjae Jeon when there is an error from kthread_run, then return proper error rather than returning -ENOMEM. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/gc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index

[f2fs-dev] [PATCH 2/4] f2fs: remove unneeded initializations in f2fs_parent_dir

2013-05-23 Thread Namjae Jeon
From: Namjae Jeon There is no need to initialize few pointers in f2fs_parent_dir as the values are not checked and instead directly initialized values are used. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/dir.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletion

[f2fs-dev] [PATCH 1/4] f2fs: push some variables to debug part

2013-05-23 Thread Namjae Jeon
From: Namjae Jeon Some, counters are needed only for the statistical information while debugging. So, those can be controlled using CONFIG_F2FS_STAT_FS, pushing the usage for few variables under this flag. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/f2fs/checkpoint.c |4

Re: [f2fs-dev] [patch] f2fs: dereferencing an ERR_PTR

2013-05-23 Thread Dan Carpenter
Btw, Linus's new Sparse changes don't like the f2fs's NEW_ADDR macro. #define NEW_ADDR-1U We use it like this: block_t src, dest; if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) { block_t is 64 bits so probably the macro should probably be: #define NE

[f2fs-dev] [patch] f2fs: dereferencing an ERR_PTR

2013-05-23 Thread Dan Carpenter
There is an error path where "dir" is an ERR_PTR. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 5148d90..921aede 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -71,7 +71,8 @@ static int recover_dentry(struct page *ipage, struct inode *inode