Re: [PATCH] jffs2: Remove NULL checks from jffs2_destroy_slab_caches

2015-08-05 Thread Salah Triki
Hi, It is not a copy paste of a cleanup patch by Julia Lawall. It is just a coincidence. In addition, I think that, generaly, cleanups patchs are similar. Best regards -- Salah Triki On Wed, Aug 05, 2015 at 10:32:47PM +0900, Sergey Senozhatsky wrote: Hi, Cc Julia Lawall On (08/04/15

[PATCH 0/3] zram: Replace pr_* with dev_*

2015-08-06 Thread Salah Triki
This patchset replaces pr_* with dev_*. dev_* attach kernel messages to the right device. In addition, patchs 1 and 2 add to messages the values of variables that trigger errors. Salah Triki (3): zram: Replace pr_info with dev_info in max_comp_streams_store zram: Replace pr_info

[PATCH 3/3] zram: Replace pr_* with dev_*

2015-08-06 Thread Salah Triki
dev_* attach the messages to the devices. --- drivers/block/zram/zram_drv.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 1c2f8b9..73f3453 100644 ---

[PATCH 1/3] zram: Replace pr_info with dev_info in max_comp_streams_store

2015-08-06 Thread Salah Triki
dev_info attachs the message to the device. And, the max compression streams value, that triggers error, is added to the message. --- drivers/block/zram/zram_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c

[PATCH 2/3] zram: Replace pr_info with dev_info in comp_algorithm_store

2015-08-06 Thread Salah Triki
dev_info attachs the message to the device. And, the algorithm's name, that triggers the error, is added to the message. --- drivers/block/zram/zram_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index

[PATCH] jffs2: Remove NULL checks from jffs2_destroy_slab_caches

2015-08-04 Thread Salah Triki
kmem_cache_destroy can be called with NULL values. Thus, the checks that precede the calls are useless. Signed-off-by: Salah Triki salah.tr...@acm.org --- fs/jffs2/malloc.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/fs/jffs2/malloc.c b/fs

[PATCH] zram: Replace pr_* with dev_*

2015-08-04 Thread Salah Triki
This patch replaces pr_info/pr_warn/pr_err with dev_info/dev_warn/dev_err. Signed-off-by: Salah Triki salah.tr...@acm.org --- drivers/block/zram/zram_drv.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/drivers/block/zram/zram_drv.c

[PATCH V2] zram: Remove useless check

2015-08-07 Thread Salah Triki
lzo1x_1_compress always returns LZO_E_OK that is equal to 0. Signed-off-by: Salah Triki salah.tr...@acm.org --- drivers/block/zram/zcomp_lzo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c index da1bc47

[PATCH] regmap: Remove useless check

2015-08-07 Thread Salah Triki
lzo1x_1_do_compress always returns LZO_E_OK. Thus, the check of the return value is useless. Signed-off-by: Salah Triki salah.tr...@acm.org --- drivers/base/regmap/regcache-lzo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/regmap/regcache-lzo.c b

[PATCH V3 1/1] zram: Remove useless check

2015-08-07 Thread Salah Triki
lzo1x_1_compress always returns LZO_E_OK that is equal to 0. Thus, the check of the return value is useless. Signed-off-by: Salah Triki salah.tr...@acm.org --- drivers/block/zram/zcomp_lzo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zcomp_lzo.c b

[PATCH] zram: Remove useless check

2015-08-07 Thread Salah Triki
lzo1x_1_compress always LZO_E_OK that is equal to 0. Signed-off-by: Salah Triki salah.tr...@acm.org --- drivers/block/zram/zcomp_lzo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zcomp_lzo.c b/drivers/block/zram/zcomp_lzo.c index da1bc47..3cf30c9

[PATCH V3 0/1] zram: Remove useless check

2015-08-07 Thread Salah Triki
The previous versions of this patch contain spelling errors and cryptic messages, please ignore them. The patch removes the check of the return value of lzo1x_1_compress, since it returns always LZO_E_OK. Salah Triki (1): zram: Remove useless check drivers/block/zram/zcomp_lzo.c | 3 +-- 1

Re: [PATCH] jffs2: Remove NULL checks from jffs2_destroy_slab_caches

2015-08-05 Thread Salah Triki
Hi, It is hard to be treated as a copy-paster, especially when you're a newcomer to the community. Best regards -- Salah Triki On Wed, Aug 05, 2015 at 10:32:47PM +0900, Sergey Senozhatsky wrote: Hi, Cc Julia Lawall On (08/04/15 13:06), Brian Norris wrote: On Tue, Aug 04, 2015 at 08

[PATCH V2 2/3] fs: befs: Insert NULL inode to dentry

2016-06-04 Thread Salah Triki
As VFS expects, lookup should insert NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index e0bd6c7..91740dd

[PATCH V3] fs: befs: Insert NULL inode to dentry

2016-06-04 Thread Salah Triki
As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index c734f21..2fea87b 100644 --- a/f

[PATCH V2 3/3] fs: befs: Increment i_count when inode is found

2016-06-04 Thread Salah Triki
As VFS expects, i_count.counter field should be incremented when the named inode is found. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 91740dd..1a67990 100644 --

[PATCH V2 1/3] fs: befs: Lookup must return error code only on real error

2016-06-04 Thread Salah Triki
File not found is not an error and lookup must return error code only on real error, otherwise creating inodes with functions like create, mkdir and so on will fail. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [PATCH 3/3] fs: befs: Increment i_count when inode is found

2016-06-04 Thread Salah Triki
On Sat, Jun 04, 2016 at 08:32:42PM +0100, Al Viro wrote: > On Sat, Jun 04, 2016 at 07:53:21PM +0100, Salah Triki wrote: > > As VFS expects, i_count field is incremented when the named inode is found. > > VFS expects no such thing. Incidentally, you have neither bothered t

[PATCH 3/3] fs: befs: Increment i_count when inode is found

2016-06-04 Thread Salah Triki
As VFS expects, i_count field is incremented when the named inode is found. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 91740dd..05153b3 100644 --- a/fs/befs/linu

[PATCH 2/3] fs: befs: Insert NULL inode to dentry

2016-06-04 Thread Salah Triki
As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index e0bd6c7..91740dd 100644 --- a/f

[PATCH 1/3] fs: befs: Lookup must return error code only on real error

2016-06-04 Thread Salah Triki
File not found is not an error and lookup must return error code only on real error, otherwise creating inodes with functions like create, mkdir and so on will fail. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 2/2] fs: befs: Check silent flag before logging errors

2016-05-25 Thread Salah Triki
Log errors only when silent flag is not set. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 75ec9a7..5b30d1f 100644 --- a/f

[PATCH 1/2] fs: befs: Move useless assignment

2016-05-25 Thread Salah Triki
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL, so the assignment to NULL is useless and it is moved above unacquire_none. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH] fs: ubifs: Replace kmem_cache_alloc/memset with kmem_cache_zalloc

2016-05-25 Thread Salah Triki
Use kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/ubifs/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 7034995..f509200 100644 --- a/fs/ubifs/super.c ++

[PATCH V2] fs: ubifs: Replace kmem_cache_alloc/memset with kmem_cache_zalloc

2016-05-26 Thread Salah Triki
Code is more readable when using kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/ubifs/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 7034995..f509200

[PATCH V2 3/3] fs: befs: Remove useless pr_err

2016-05-25 Thread Salah Triki
Remove pr_err since when kzalloc fails there is a generic out of memory and stack dump. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index edee857..5

[PATCH V3 3/4] fs: befs: Remove useless pr_err

2016-05-25 Thread Salah Triki
Remove pr_err since when kzalloc fails there is a generic out of memory and stack dump. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index edee857..5

[PATCH V3 1/4] fs: befs: Move useless assignment

2016-05-25 Thread Salah Triki
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL, so the assignment to NULL is useless and it is moved above unacquire_none. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH V2 1/3] fs: befs: Move useless assignment

2016-05-25 Thread Salah Triki
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL, so the assignment to NULL is useless and it is moved above unacquire_none. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH V4 6/6] fs: befs: Coalesce format in log messages

2016-05-25 Thread Salah Triki
Coalese format is more readable, even if it goes over 80 column width, so group format snippets together. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/fs/befs/linuxvfs.

[PATCH V4 2/6] fs: befs: Check silent flag before logging errors

2016-05-25 Thread Salah Triki
Log errors only when silent flag is not set. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 75ec9a7..edee857 100644 --- a/fs/befs/linu

[PATCH V4 1/6] fs: befs: Move useless assignment

2016-05-25 Thread Salah Triki
Control is transfered to unacquire_none when sb->s_fs_info is equal to NULL, so the assignment to NULL is useless and it is moved above unacquire_none. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH V4 5/6] fs: befs: Remove useless pr_err

2016-05-25 Thread Salah Triki
Remove pr_err since kmem_cache_create log error and dump stack. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 04541f3..c734f21 100644 --- a/f

[PATCH V4 4/6] fs: befs: Remove useless befs_error

2016-05-25 Thread Salah Triki
Remove befs_error since when kmalloc fails there is a generic out of memory and stack dump. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 5b47b0f..04541f3 100644 --

[PATCH V4 3/6] fs: befs: Remove useless pr_err

2016-05-25 Thread Salah Triki
Remove pr_err since when kzalloc fails there is a generic out of memory and stack dump. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index edee857..5

[PATCH V3 2/4] fs: befs: Check silent flag before logging errors

2016-05-25 Thread Salah Triki
Log errors only when silent flag is not set. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 75ec9a7..edee857 100644 --- a/fs/befs/linu

[PATCH V3 4/4] fs: befs: Remove useless befs_error

2016-05-25 Thread Salah Triki
Remove befs_error since when kmalloc fails there is a generic out of memory and stack dump. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 5b47b0f..04541f3 100644 --

[PATCH V2 2/3] fs: befs: Check silent flag before logging errors

2016-05-25 Thread Salah Triki
Log errors only when silent flag is not set. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 75ec9a7..edee857 100644 --- a/fs/befs/linu

[PATCH] fs: befs: Replace befs_bread by sb_bread

2016-06-24 Thread Salah Triki
Since befs_bread merely calls sb_bread, replace it by sb_bread. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 6 +++--- fs/befs/io.c | 24 fs/befs/io.h | 2 -- fs/befs/linuxvfs.c | 2 +- 4 files changed, 4 inse

[PATCH] bfs: rename should update mtime

2016-04-25 Thread Salah Triki
bfs_rename should update mtime on target. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/bfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3ec6113..d5902d9 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c @@ -252,7

[PATCH V2] bfs: rename should update mtime

2016-04-25 Thread Salah Triki
bfs_rename should update ctime and mtime on target. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/bfs/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3ec6113..c69f7dc 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c @@ -254,6 +254,7 @@ stat

[PATCH] fs: befs: replace GFP_KERNEL by GFP_NOFS

2016-05-20 Thread Salah Triki
Since this is a filesystem driver, using the flag GFP_NOFS is more appropriate than the flag GFP_KERNEL. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c

[PATCH] fs: befs: use flags field to validate fs state

2016-05-10 Thread Salah Triki
flags field records the state of the superblock, so it is more appropriate to use this field for validating the fs state than using the fields log_start and log_end. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] fs: jffs2: initialize the field fs_flags

2016-05-12 Thread Salah Triki
jffs2 requires device, so the field fs_flags of the structure file_system_type must be initialized to FS_REQUIRES_DEV. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/jffs2/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index 0

[PATCH] bfs: rename should update ctime and mtime

2016-05-15 Thread Salah Triki
bfs_rename should update ctime and mtime on target, and mark the target as dirty. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/bfs/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3ec6113..da30bb7 100644 --- a/fs/bfs/dir.c +++ b/

bfs: rename should update ctime and mtime

2016-05-15 Thread Salah Triki
bfs_rename should update ctime and mtime on target, and mark the target as dirty. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/bfs/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3ec6113..da30bb7 100644 --- a/fs/bfs/dir.c +++ b/

[PATCH V3] bfs: rename should update mtime

2016-05-15 Thread Salah Triki
bfs_rename should update ctime and mtime on target, and mark the target as dirty. Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/bfs/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 3ec6113..da30bb7 100644 --- a/fs/bfs/dir.c +++ b/

[PATCH 1/2] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
bh is reinitialized by sb_bread() so no need to init it with NULL in the beginning of befs_bread_iaddr() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 7a5b4ec..1341fa3

[PATCH 2/2] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
bh is reinitialized by sb_bread() so no need to init it with NULL in the beginning of befs_bread() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 1341fa3..523c8af

[PATCH 4/4] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
befs_ino is reinitialized by BEFS_I() so no need to init it with NULL in the beginning of befs_iget() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 8

[PATCH 1/4] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
inode is reinitialized by befs_iget() so no need to init it with NULL in the beginning of befs_lookup() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c

[PATCH 3/4] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
raw_inode is reinitialized to bh->b_data so no need to init it with NULL in the beginning of befs_iget() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvf

[PATCH 2/4] fs: befs: remove unneeded initialization to NULL

2016-05-09 Thread Salah Triki
bh is reinitialized by befs_bread() so no need to init it with NULL in the beginning of befs_iget() Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index d

[PATCH 2/3] fs: befs: remove unneeded initialization to NULL

2016-05-07 Thread Salah Triki
bh is reinitialized by befs_read_datastream() so no need to init it with NULL in the beginning of befs_read_lsymlink(). Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/datastream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/datastream.c b/f

[PATCH 3/3] fs: befs: remove unneeded initializations to NULL

2016-05-07 Thread Salah Triki
iaddr_array is unconditionally initialized to NULL in befs_find_brun_dblindirect(). Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/datastream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c index 068f7be..4

[PATCH 1/3] fs: befs: remove unneeded initialization to NULL

2016-05-07 Thread Salah Triki
bh is reinitialized by befs_bread_iaddr() so no need to init it with NULL in the beginning of befs_read_datastream(). Signed-off-by: Salah Triki <salah.tr...@acm.org> --- fs/befs/datastream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/datastream.c b/f

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Mon, Jul 25, 2016 at 02:23:31PM -0700, Greg KH wrote: > On Mon, Jul 25, 2016 at 06:21:19PM +0100, Luis de Bethencourt wrote: > > PD: I don't know if there is a formal process for maintainership in the > > Linux > > kernel community. I am happy to follow that if it exists. > > If no one

[RESEND PATCH V3] fs: befs: Insert NULL inode to dentry

2016-07-26 Thread Salah Triki
As VFS expects, lookup inserts NULL inode to dentry when the named inode does not exist. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index c734f21..2fea87b 100644 --

Re: Volunteering for BeFS maintainership

2016-07-26 Thread Salah Triki
On Tue, Jul 26, 2016 at 01:56:56PM -0400, Theodore Ts'o wrote: > On Tue, Jul 26, 2016 at 12:16:24AM +0100, Luis de Bethencourt wrote: > > > > I will wait a few days in case other people want to comment before. > > > > Sounds great! Do you have a git tree set up for your befs development? > >

[RESEND PATCH 4/4] fs: befs: Remove goto from befs_bread_iaddr

2016-07-26 Thread Salah Triki
Since goto statement merely returns NULL, replace it with return statement. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 4223b77..af631a6 100644 --- a/fs/bef

[RESEND PATCH 3/4] fs: befs: Remove useless calls to brelse in befs_find_brun_dblindirect

2016-07-26 Thread Salah Triki
The calls to brelse are useless since dbl_indir_block and indir_block are NULL. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com> --- fs/befs/datastream.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/datastream

[RESEND PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-26 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com>

[RESEND PATCH 2/4] fs: befs: Coding style fix

2016-07-26 Thread Salah Triki
Constant has to be capitalized. Signed-off-by: Salah Triki <salah.tr...@gmail.com> Acked-by: Luis de Bethencourt <lui...@osg.samsung.com> --- fs/befs/btree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index 307645f9..e5

[PATCH 2/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to set *value, it will be overwritten later. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index a0e8cfa..f33fc6c 100644 --- a/fs/befs/btree.c +++ b/fs/befs/b

[PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-07-31 Thread Salah Triki
Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned value by this function is only used once. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/datastream.c b/f

[PATCH 1/6] fs: befs: remove unneeded initialization to zero

2016-07-31 Thread Salah Triki
off is reinitialized by befs_read_datastream, so no need to init it with zero in the beginning of befs_bt_read_node. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c

[PATCH 6/6] fs: befs: remove ret variable

2016-07-31 Thread Salah Triki
ret is initialized to -EIO and is never modified, so remove ret and use -EIO directly. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 2b68c81..c

[PATCH 3/6] fs: befs: remove useless initialization to zero

2016-07-31 Thread Salah Triki
node_off is unconditionally set to bt_super.root_node_ptr, so no need to init it to zero. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/btree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/btree.c b/fs/befs/btree.c index f33fc6c..3cb97e8

[PATCH 5/6] fs: befs: remove in vain variable assignment

2016-07-31 Thread Salah Triki
There is no need to init res, since it will be overwitten later by befs_fblock2brun(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 6bc5b40..2

Re: [PATCH 1/3] befs: remove off argument of befs_read_datastream

2016-07-27 Thread Salah Triki
On Tue, Jul 12, 2016 at 12:02:48AM +0100, Luis de Bethencourt wrote: > befs_read_datastream() is used to read the inode from the disk, off is > meant to provide the offset of the data in the buffer head. But the only > function using this argument already knows the starting offset of the node, >

Re: [PATCH 1/2] fs: befs: check silent flag before logging error

2016-07-27 Thread Salah Triki
silent) >*/ > blocksize = sb_min_blocksize(sb, 1024); > if (!blocksize) { > - befs_error(sb, "unable to set blocksize"); > + if (!silent) > + befs_error(sb, "unable to set blocksize"); > goto unacquire_priv_sbp; > } > > -- > 2.5.1 > Acked-by: Salah Triki <salah.tr...@gmail.com> regards, salah

Re: [PATCH 2/3] befs: remove constant variable

2016-07-27 Thread Salah Triki
if (!dir_emit(ctx, keybuf, keysize, > - (ino_t) value, d_type)) > + (ino_t) value, DT_UNKNOWN)) > return 0; > } > ctx->pos++; > -- > 2.5.1 > Acked-by: Salah Triki <salah.tr...@gmail.com> Thanx :) salah

Re: [PATCH 2/4] befs: add check for ag_shift in superblock

2016-08-11 Thread Salah Triki
r_ag."); > + > if (befs_sb->log_start != befs_sb->log_end || befs_sb->flags == > BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > "journal. You must boot into BeOS and mount this > volume " > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx :) Salah

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-11 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:03:47AM +0100, Luis de Bethencourt wrote: > On 10/08/16 22:41, Salah Triki wrote: > > On Tue, Aug 09, 2016 at 11:01:23PM +0100, Luis de Bethencourt wrote: > >> befs_dump_super_block() wasn't giving the inode_size information when > &g

Re: [PATCH 1/4] befs: dump inode_size superblock information

2016-08-10 Thread Salah Triki
befs_debug(sb, " used_blocks %llu", fs64_to_cpu(sb, sup->used_blocks)); > + befs_debug(sb, " inode_size %u", fs32_to_cpu(sb, sup->inode_size)); > > befs_debug(sb, " magic2 %08x", fs32_to_cpu(sb, sup->magic2)); > befs_debug(sb, " blocks_per_ag %u", > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > On 10/08/16 23:12, Salah Triki wrote: > > Check that the allocation group number is not greater or equal to the > > number of allocations group in the file system and return BEF_ERR in the > > case of error

[PATCH] fs: remove unnecessary setting of error

2016-08-12 Thread Salah Triki
setting error to -EINVAL is unnecessary. It is already set, above. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 4fd6e25..b438edc 100644 --- a/fs/open.c +++ b/fs/open.c @@ -176,7 +176,6 @@

Re: [PATCH] befs: fix typos in btree.c

2016-08-12 Thread Salah Triki
lock *sb, struct > befs_btree_node *node, > * > * Returns 0 if @key1 and @key2 are equal. > * Returns >0 if @key1 is greater. > - * Returns <0 if @key2 is greater.. > + * Returns <0 if @key2 is greater. > */ > static int > befs_compare_strings(const void *key1, int keylen1, > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx, Salah

Re: [PATCH 1/4] befs: check allocation_group number before use

2016-08-12 Thread Salah Triki
On Fri, Aug 12, 2016 at 10:38:58AM +0100, Luis de Bethencourt wrote: > On 12/08/16 08:26, Salah Triki wrote: > > On Thu, Aug 11, 2016 at 11:56:16AM +0100, Luis de Bethencourt wrote: > >> On 10/08/16 23:12, Salah Triki wrote: > >>> Check that the allocation group

[PATCH] befs: return BEFS_ERR if validation of ag_shift fails

2016-08-12 Thread Salah Triki
Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/super.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 7c50025..2e3a3fd 100644 --- a/fs/befs/super.c +++ b/fs/befs/super.c @@ -101,10 +101,13 @@ befs_ch

Re: [PATCH 3/4] befs: fix comment style

2016-08-10 Thread Salah Triki
nformation > -* in different ways as a consistency check. > + * block_shift and block_size encode the same information > + * in different ways as a consistency check. >*/ > > if ((1 << befs_sb->block_shift) != befs_sb->block_size) { > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

Re: [PATCH 4/4] befs: fix style issues in super.c

2016-08-10 Thread Salah Triki
s == BEFS_DIRTY) { > befs_error(sb, "Filesystem not clean! There are blocks in the " > -"journal. You must boot into BeOS and mount this > volume " > -"to make it clean."); > +"journal. You must boot into BeOS and mount this " > +"volume to make it clean."); > return BEFS_ERR; > } > > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx Salah

[PATCH 2/4] befs: check return value of iaddr2blockno

2016-08-10 Thread Salah Triki
The call of iaddr2blockno may fail, so check its return value and propagate error, if any. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 30 -- fs/befs/inode.c | 10 -- fs/befs/io.c | 3 +++ fs/befs/linu

[PATCH 1/4] befs: check allocation_group number before use

2016-08-10 Thread Salah Triki
Check that the allocation group number is not greater or equal to the number of allocations group in the file system and return BEF_ERR in the case of error. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/f

[PATCH 3/4] befs: remove the validation of allocation group number

2016-08-10 Thread Salah Triki
Validating the allocation group number is unnecessary since it will be done by iaddr2blockno(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index 14eef7d..f9790f5 100644 --- a/f

[PATCH 4/4] befs: remove unnecessary initialization

2016-08-10 Thread Salah Triki
There is no need to init block, since it will be overwitten later by iaddr2blockno(). Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/io.c b/fs/befs/io.c index f9790f5..39d0dce 100644 --- a/f

Re: [PATCH 3/6] fs: befs: remove useless initialization to zero

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:44:18PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > node_off is unconditionally set to bt_super.root_node_ptr, so no need to > > init it to zero. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com

Re: [PATCH 2/6] fs: befs: remove in vain variable assignment

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 02:24:34PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > There is no need to set *value, it will be overwritten later. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com> > > --- > > fs/bef

Re: [PATCH 4/6] fs: befs: remove unnecessary *befs_sb variable

2016-08-06 Thread Salah Triki
On Mon, Aug 01, 2016 at 03:02:57PM +0100, Luis de Bethencourt wrote: > On 31/07/16 21:34, Salah Triki wrote: > > Remove *befs_sb and just call BEFS_SB(sb) directly, since the returned > > value by this function is only used once. > > > > Signed-off-by: Salah T

Re: [PATCH v2 1/2] befs: remove unused BEFS_BT_MATCH

2016-08-06 Thread Salah Triki
On Fri, Aug 05, 2016 at 01:41:20PM +0100, Luis de Bethencourt wrote: > befs_btree_find(), the only caller of befs_find_key(), only cares about if > the return from that function is BEFS_BT_MATCH or not. It never uses the > partial match given with BEFS_BT_MATCH. Removing that return and don't set

Re: [PATCH v2 2/2] befs: fix typo in befs_find_key

2016-08-06 Thread Salah Triki
ntain key, just skeep this node */ > + /* if node can not contain key, just skip this node */ > last = node->head.all_key_count - 1; > thiskey = befs_bt_get_key(sb, node, last, ); > > -- > 2.5.1 > Ack-by: Salah Triki <salah.tr...@gmail.com> Thanx Luis :) Salah

[PATCH 2/2] befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@

[PATCH 3/3] fs: befs: fix typo in befs_sb_info

2016-08-09 Thread Salah Triki
Fixing jornal to Journal. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/befs.h b/fs/befs/befs.h index 511d16d..55f3ea2 100644 --- a/fs/befs/befs.h +++ b/fs/befs/befs.h @@ -46,7 +46,7 @@

[PATCH 1/3] fs: befs: load flags field from disk

2016-08-09 Thread Salah Triki
flags field is usefull for validating the superblock state, so add this field to befs_sb_info and read the state from the disk. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/fs/befs/be

[PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
flags field records the superblock state, so check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/befs/super.c b/fs/befs/super.c index 5ab75e8..79be409 100644 --

Re: [PATCH v3 1/2] befs: remove unused BEFS_BT_PARMATCH

2016-08-09 Thread Salah Triki
valarray[mid]); > - befs_debug(sb, "<--- %s found %s at %d", __func__, thiskey, mid); > - return BEFS_BT_PARMATCH; > + > + /* return an existing value so caller can arrive to a leaf node */ > + *value = fs64_to_cpu(sb, valarray[mid]); > + befs_error(sb, "<--- %s %s not found", __func__, findkey); > + befs_debug(sb, "<--- %s ERROR", __func__); > + return BEFS_BT_NOT_FOUND; > } > > /** > -- > 2.5.1 > Signed-off-by: Salah Triki <salah.tr...@gmail.com> Thanx :) Salah

Re: [PATCH 2/3] fs: befs: check flags field to validate the superblock state

2016-08-09 Thread Salah Triki
On Tue, Aug 09, 2016 at 01:40:25PM +0100, Luis de Bethencourt wrote: > On 09/08/16 13:32, Salah Triki wrote: > > flags field records the superblock state, so check if it is equal to > > BEFS_DIRTY. > > > > Signed-off-by: Salah Triki <salah.tr...@gmail.com>

[PATCH 1/2] befs: add flags field to validate superblock state

2016-08-09 Thread Salah Triki
For validating superblock state, add flags field to befs_sb_info, read the state from the disk and check if it is equal to BEFS_DIRTY. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/befs.h | 3 +++ fs/befs/super.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-)

Re: [PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
On Sat, Jul 02, 2016 at 12:38:18PM +0100, Luis de Bethencourt wrote: > On 02/07/16 09:05, Salah Triki wrote: > > The only caller of befs_find_brun_direct is befs_fblock2brun, which > > already validates that the block is within the range of direct blocks. > > So remove the

[PATCH 1/4] fs: befs: Remove redundant validation from befs_find_brun_direct

2016-07-02 Thread Salah Triki
The only caller of befs_find_brun_direct is befs_fblock2brun, which already validates that the block is within the range of direct blocks. So remove the duplicate validation. Signed-off-by: Salah Triki <salah.tr...@gmail.com> --- fs/befs/datastream.c | 8 1 file changed, 8 del

  1   2   3   >