[f2fs-dev] [jaegeuk-f2fs:dev-test 187/191] fs/f2fs/super.c:858 f2fs_parse_param() warn: impossible condition '(result.int_32 > ((~0 >> 1))) => (s32min-s32max > s32max)'

2025-05-16 Thread Dan Carpenter
add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202505161519.ew2oo7cw-...@intel.com/ smatch warnings: fs/f2fs/super.c:858 f2fs_parse_param() warn: impossible condition '(result.int_32 > ((~0 >> 1))) => (s32mi

Re: [f2fs-dev] [bug report] f2fs: Use folios in do_garbage_collect()

2025-05-07 Thread Dan Carpenter
On Wed, May 07, 2025 at 10:59:11AM +0800, Chao Yu wrote: > On 5/2/25 16:15, Dan Carpenter wrote: > > Hello Matthew Wilcox (Oracle), > > > > 1768 /* reference all summary page */ > > 1769 while (segno < end_segno) { > > 1770

[f2fs-dev] [bug report] f2fs: Use folios in do_garbage_collect()

2025-05-02 Thread Dan Carpenter
migrated >= sbi->migration_granularity) 1798 goto skip; --> 1799 if (!folio_test_uptodate(sum_folio) || ^ Dereferenced here. 1800 unlikely(f2fs_cp_e

Re: [f2fs-dev] [PATCH][next] f2fs: remove redundant assignment to variable err

2025-03-19 Thread Dan Carpenter
b_info *sbi, pgoff_t nid, > if (err < 0) { > goto out_put_err; > } else if (err == LOCKED_PAGE) { > - err = 0; > goto page_hit; > } We could remove the curly braces as well. regards, dan carpenter __

Re: [f2fs-dev] [PATCH v2] f2fs: compress: don't redirty sparse cluster during {, de}compress

2024-12-11 Thread Dan Carpenter
tests which deal with compression tests/f2fs/002 and tests/f2fs/007. But it feels like xfstests is not really the right place for this sort of thing, it would be better as part of some sort of fuzz testing. What do you think? regards, dan carpenter _

[f2fs-dev] [bug report] f2fs: stop checkpoint when get a out-of-bounds segment

2024-02-27 Thread Dan Carpenter
2fs_handle_critical_error(sbi, reason, end_io); 36 } regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

[f2fs-dev] [bug report] f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC

2024-02-27 Thread Dan Carpenter
i)->user_block_count); 2095 2096 SM_I(sbi)->segment_count = (int)SM_I(sbi)->segment_count + segs; 2097 MAIN_SEGS(sbi) = (int)MAIN_SEGS(sbi) + segs; regards, dan carpenter ___ Linux-f2fs-devel mailing list Linu

Re: [f2fs-dev] [PATCH v2] f2fs: fix zoned block device information initialization

2024-01-21 Thread Dan Carpenter
/archive/20240120/202401201237.ovvyekvs-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter

Re: [f2fs-dev] [PATCH] f2fs: remove some dead code

2023-04-17 Thread Dan Carpenter
s get rid of "ret" as well: return filemap_check_errors(NODE_MAPPING(sbi)); regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH] f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()

2023-01-13 Thread Dan Carpenter
) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter New smatch warnings: fs/f2fs/iostat.c:228 __update_iostat_latency() error: buffer overflow 'io_lat->sum_lat[type]' 3 <= 3 fs/f

Re: [f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()

2022-05-12 Thread Dan Carpenter
On Wed, May 11, 2022 at 10:37:57AM -0700, Jaegeuk Kim wrote: > Hi Dan, > > Thank you for the fix. If you don't mind, can I integrate this fix into > the original patch which is in -next? > Yeah, that's not a problem. Feel free. regards, dan carpenter > Thanks,

[f2fs-dev] [PATCH] f2fs: fix error code in f2fs_ioc_start_atomic_write()

2022-05-11 Thread Dan Carpenter
Return an error code if f2fs_iget() fails. Currently it returns success. Fixes: 3d7ad9c30607 ("f2fs: change the current atomic write way") Signed-off-by: Dan Carpenter --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 79

Re: [f2fs-dev] [PATCH 0/6] Remove usage of list iterator past the loop body

2022-03-07 Thread Dan Carpenter
ly other places which rely on the old behavior. In an ideal world, with the new API the compiler would warn about uninitialized variables, but unfortunately that warning is disabled by default so we still have to rely on kbuild/Clang/Smatch to

Re: [f2fs-dev] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread Dan Carpenter
.c index ddf5737c63d9..c9dffa5c40a2 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3771,6 +3771,9 @@ EXPORT_SYMBOL(kmem_cache_free_bulk); * * Don't free memory not originally allocated by kmalloc() * or you will run into trouble. + * + * CHECKER information + * frees: $0 */ void kfree(const void *ob

Re: [f2fs-dev] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread Dan Carpenter
^^^ 425 426 for (port = 0; port < r8a66597->max_root_hub; port++) { 427 if (r8a66597->root_hub[port].dev == dev) { ^^^ 428 r8a66597->root_hub[port].dev = NULL; 42

Re: [f2fs-dev] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
On Mon, Feb 28, 2022 at 10:20:28AM -0800, Joe Perches wrote: > On Mon, 2022-02-28 at 14:24 +0300, Dan Carpenter wrote: > > > a multi-line indent gets curly braces for readability even though > > it's not required by C. And then both sides would get curly braces. > &

Re: [f2fs-dev] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
een what is a related part of a patch is a bit vague and some maintainers will ask you to add or subtract from a patch depending on their individual tastes. I don't really have an exact answer, but I felt like this patch needs to be subtracted from. Especially i

Re: [f2fs-dev] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-02-28 Thread Dan Carpenter
dev_name(&_phy->dev)); > BUG(); > } > } else { > - sas_port_create_link(port, phy); > - list_add_tail(&phy->port_siblings, &port->phy_list); > + s

Re: [f2fs-dev] [PATCH 6/6] treewide: remove check of list iterator against head past the loop body

2022-02-28 Thread Dan Carpenter
nse, but it's out of date now. Just delete it. > - if (group && &group->list == &rcd->tid_group_list.list) > + if (!group) > goto bail_eagain; > group = list_prepare_entry(group, &rcd->tid_group_list.list, > list); regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 3/6] treewide: fix incorrect use to determine if list is empty

2022-02-28 Thread Dan Carpenter
-- > drivers/media/pci/saa7134/saa7134-alsa.c | 4 ++-- > drivers/perf/xgene_pmu.c | 13 +++-- > 3 files changed, 11 insertions(+), 10 deletions(-) These are all bug fixes. 1) Send them as 3 separate patches. 2) Add Fixes tags. regards, dan carpenter _

Re: [f2fs-dev] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
break; > + } > } > - if (&req->req != _req) { > + if (!req) { > ep->stopped = stopped; > spin_unlock_irqrestore(&ep->dev->lock, flags); > return -EINVAL; > @@ -954,7 +957,6 @@ net2272_dequ

[f2fs-dev] [bug report] f2fs: add gc_urgent_high_remaining sysfs node

2021-12-09 Thread Dan Carpenter
return count; 487 } 488 489 if (!strcmp(a->attr.name, "gc_urgent_high_remaining")) { --> 490 if (t < 0) ^ impossible. 491 retu

[f2fs-dev] [bug report] f2fs: introduce periodic iostat io latency traces

2021-08-16 Thread Dan Carpenter
sbi->wr_sum_lat[sync][iotype] += ts_diff; 3371sbi->wr_bio_cnt[sync][iotype]++; 3372if (ts_diff > sbi->wr_peak_lat[sync][iotype]) 3373sbi->wr_peak_lat[sync][iotype] = ts_diff; 3374} 3375

Re: [f2fs-dev] KMSAN: uninit-value in f2fs_lookup

2020-09-25 Thread Dan Carpenter
F2FS_I(dir)->task = current; 390 return de; Which means that we return a NULL "de" and "*res_page" is uninitialized and that matches what syzbot found throug runtime testing. 391 } regards, dan carpenter ___

Re: [f2fs-dev] [PATCH V2] f2fs: Avoid double lock for cp_rwsem during checkpoint

2020-04-29 Thread Dan Carpenter
er comment. This looks really old. Maybe commit 399368372ed9 ("f2fs: introduce a new global lock scheme")? regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH] f2fs: signedness bug in f2fs_fname_setup_ci_filename()

2019-09-04 Thread Dan Carpenter
On Wed, Sep 04, 2019 at 07:43:07PM +0800, Chao Yu wrote: > On 2019/9/4 18:02, Dan Carpenter wrote: > > The error handling doesn't work because "cf_name->len" is unsigned. > > Dan, thanks for catching this, would you mind merging this into original > patch,

[f2fs-dev] [PATCH] f2fs: signedness bug in f2fs_fname_setup_ci_filename()

2019-09-04 Thread Dan Carpenter
The error handling doesn't work because "cf_name->len" is unsigned. Fixes: fbce5d4ab3ab ("f2fs: optimize case-insensitive lookups") Signed-off-by: Dan Carpenter --- fs/f2fs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/dir.c b/fs/f

Re: [f2fs-dev] [PATCH] f2fs: don't allow negative ->write_io_size_bits

2019-02-13 Thread Dan Carpenter
On Wed, Feb 13, 2019 at 04:49:57PM +0800, Chao Yu wrote: > On 2019/2/13 11:32, Chao Yu wrote: > > On 2019/2/12 2:45, Dan Carpenter wrote: > >> We put an upper bound on ->write_io_size_bits but we don't have a lower > >> bound. > > > > Oh, lower boun

[f2fs-dev] [PATCH] f2fs: don't allow negative ->write_io_size_bits

2019-02-11 Thread Dan Carpenter
We put an upper bound on ->write_io_size_bits but we don't have a lower bound. Signed-off-by: Dan Carpenter --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 3ec11d392a5e..2db2d38e2aca 100644 --- a/fs/f2fs

Re: [f2fs-dev] [bug report] f2fs: use rb_*_cached friends

2019-01-10 Thread Dan Carpenter
those warnings. Thanks! regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

[f2fs-dev] [bug report] f2fs: fix missing unlock(sbi->gc_mutex)

2019-01-03 Thread Dan Carpenter
f2fs_write_checkpoint(sbi, &cpc); 1485 1486sbi->unusable_block_count = 0; 1487mutex_unlock(&sbi->gc_mutex); 1488return 0; 1489 } regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [bug report] f2fs: use rb_*_cached friends

2018-10-12 Thread Dan Carpenter
look at this! I think that's probably a bit complicated for Smatch... regards, dan carpenter ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

[f2fs-dev] [bug report] f2fs: use rb_*_cached friends

2018-10-11 Thread Dan Carpenter
/ 609 if (dei.len >= 1 && 610 prev.len < F2FS_MIN_EXTENT_LEN && 611 et->largest.len < F2FS_MIN_EXTENT_LEN) { 612 et->largest

Re: [f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Dan Carpenter
d by LBA > order"), did Smatch missed to check original commit? > It does warn about __issue_discard_cmd_range() but I didn't look at which patch introduced that warning... This code is several months old, but I don't know why it's o

[f2fs-dev] [bug report] f2fs: issue small discard by LBA order

2018-08-07 Thread Dan Carpenter
^^^ Dereference. 1278 dc = rb_entry_safe(node, struct discard_cmd, rb_node); 1279 } 1280 1281 blk_finish_plug(&plug); 1282 See also: fs/f2fs/segment.c:2550 __issue_discard_c

[f2fs-dev] [PATCH] f2fs: Fix uninitialized return in f2fs_ioc_shutdown()

2018-06-20 Thread Dan Carpenter
"ret" can be uninitialized on the success path when "in == F2FS_GOING_DOWN_FULLSYNC". Fixes: 60b2b4ee2bc0 ("f2fs: Fix deadlock in shutdown ioctl") Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6880c6f78d58..73c875c81ed6 100644 ---

[f2fs-dev] [patch] f2fs: remove unneeded condition

2016-12-16 Thread Dan Carpenter
We checked that "inode" is not an error pointer earlier so there is no need to check again here. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index 56c19b0610a8..290a9d7060ef 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -321,9 +321,9 @@ sta

[f2fs-dev] [bug report] f2fs: fix to avoid reading out encrypted data in page cache

2016-07-12 Thread Dan Carpenter
if (pages) 1119 put_page(page); 1120 } 1121 BUG_ON(pages && !list_empty(pages)); 1122 if (bio) 1123 __submit_bio(F2FS_I_SB(inode), bio, DATA); ^^^ Dereferenced. 1

Re: [f2fs-dev] f2fs: reorganize f2fs_map_blocks

2015-09-21 Thread Dan Carpenter
goto sync_out; 669 } 670 } regards, dan carpenter -- ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.source

Re: [f2fs-dev] f2fs: callers take care of the page from bio error

2015-08-12 Thread Dan Carpenter
unlock the page. > > Hmm, any workaround to avoid that warning? > No, it's fine. Just ignore it. regards, dan carpenter -- ___ Linux-f2fs-devel mailing list Lin

Re: [f2fs-dev] f2fs: callers take care of the page from bio error

2015-08-12 Thread Dan Carpenter
e_page(apage, READA); 1042 f2fs_put_page(apage, err ? 1 : 0); In the old code we took errors into consideration but now we treat them as LOCKED_PAGE. Is that intentional? A lot of the other callers in that patch still check for errors... 104

[f2fs-dev] [patch] f2fs: cleanup a confusing indent

2015-05-14 Thread Dan Carpenter
The return was not indented far enough so it looked like it was supposed to go with the other if statement. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 17e89ba..741db3a 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -554,8 +554,8 @@ static

Re: [f2fs-dev] f2fs crypto: add symlink encryption

2015-05-12 Thread Dan Carpenter
err = f2fs_setup_fname_crypto(inode); 439 if (err) 440 goto out; regards, dan carpenter -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest o

Re: [f2fs-dev] f2fs crypto: add symlink encryption

2015-05-12 Thread Dan Carpenter
nlock(); return err; Btw shouldn't we earlier if page_symlink() fails? regards, dan carpenter -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring

Re: [f2fs-dev] f2fs crypto: filename encryption facilities

2015-05-12 Thread Dan Carpenter
e_decrypt (error code %d)\n", ^^ 191 __func__, res); 192 return res; 193 } regards, dan carpenter ---

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-22 Thread Dan Carpenter
On Wed, Apr 22, 2015 at 11:13:36AM -0700, Jaegeuk Kim wrote: > On Wed, Apr 22, 2015 at 01:27:22PM +0300, Dan Carpenter wrote: > > On Wed, Apr 22, 2015 at 02:28:22PM +0800, Chao Yu wrote: > > > > > fs/f2fs/namei.c > > > > >299 static void *f2fs_fo

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-22 Thread Dan Carpenter
om smatch not true? or I made a mistake? If so, > please > correct me. Smatch is correct, it returns NULL on error. However, I agree that it looks like it is supposed to return an ERR_PTR. Every caller seems to expect that. I suspect the right fix is to change page_follow_link_light(). B

Re: [f2fs-dev] f2fs: avoid abnormal behavior on broken symlink

2015-04-20 Thread Dan Carpenter
ntial NULL deref. 310 page_cache_release(page); 311 return ERR_PTR(-ENOENT); 312 } 313 return page; 314 } regards, dan carpenter -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT

Re: [f2fs-dev] f2fs: add key function to handle inline dir

2014-10-21 Thread Dan Carpenter
NR_INLINE_DENTRY * F2FS_SLOT_LEN); 364 regards, dan carpenter -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls

[f2fs-dev] [patch] f2fs: potential shift wrapping buf in f2fs_trim_fs()

2014-09-25 Thread Dan Carpenter
My static checker complains that segment is a u64 but only the lower 31 bits can be used before we hit a shift wrapping bug. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index b423005..d8ed1b8 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -949,7

Re: [f2fs-dev] f2fs: use meta_inode cache to improve roll-forward speed

2014-09-15 Thread Dan Carpenter
return PTR_ERR(page); 182 Also: fs/f2fs/recovery.c:446 recover_data() warn: 'page' isn't an ERR_PTR regards, dan carpenter -- Want excitement? Manually upgrade your production da

[f2fs-dev] [patch] f2fs: simplify by using a literal

2014-08-28 Thread Dan Carpenter
We can make the code a bit simpler because we know that "!retry" is zero. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 0f61f5a..41bdf51 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1133,7 +1133,7 @@ free_sbi: /* give only o

[f2fs-dev] [patch] f2fs: checking for IS_ERR() instead of NULL

2014-01-08 Thread Dan Carpenter
grab_cache_page_write_begin() returns NULL on error, it doesn't return error pointers. Fixes: e18c65b2ac91 ('f2fs: key functions to handle inline data') Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 69a923e38f0c..e0d800a1d79f 100644 --- a/f

Re: [f2fs-dev] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-28 Thread Dan Carpenter
On Thu, Nov 28, 2013 at 06:24:41PM +0900, Jaegeuk Kim wrote: > 2013-11-28 (목), 11:08 +0300, Dan Carpenter: > > On Thu, Nov 28, 2013 at 01:04:47PM +0900, Jaegeuk Kim wrote: > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > > index b7ad1ec..5fa54c1 100644 > > &g

Re: [f2fs-dev] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-28 Thread Dan Carpenter
gt; > /* read segment summary of victim */ > sum_page = get_sum_page(sbi, segno); > - if (IS_ERR(sum_page)) > - return; Didn't you want to check for NULL here? regards, dan carpe

Re: [f2fs-dev] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-27 Thread Dan Carpenter
On Wed, Nov 27, 2013 at 06:04:57PM +0900, Jaegeuk Kim wrote: > Hi, > > 2013-11-27 (수), 11:31 +0300, Dan Carpenter: > > On Wed, Nov 27, 2013 at 11:46:21AM +0900, Jaegeuk Kim wrote: > > > Hi Dan, > > > > > > Thank you for the report. > > > >

Re: [f2fs-dev] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-27 Thread Dan Carpenter
;re unlikely to support 18TB with f2fs so let's just leave the code as is with the original warning. regards, dan carpenter -- Rapidly troubleshoot problems before they affect your business. Most IT organizations

Re: [f2fs-dev] f2fs: introduce f2fs_issue_discard() to clean up

2013-11-26 Thread Dan Carpenter
_discard(sbi->sb->s_bdev, sector_addr, sector_len, 277 GFP_NOFS, 0); 278 trace_f2fs_issue_discard(sbi->sb, blkstart, blklen); 279 } regards, dan carpenter -- Shape the Mobile Ex

[f2fs-dev] [patch v2] f2fs: alloc_page() doesn't return an ERR_PTR

2013-08-14 Thread Dan Carpenter
alloc_page() returns a NULL on failure, it never returns an ERR_PTR. Signed-off-by: Dan Carpenter --- v2: fix the calls in recovery.c as well. diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f5172e2..3e87fe0 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1515,8 +1515,8 @@ int

Re: [f2fs-dev] [patch] f2fs: alloc_page() doesn't return an ERR_PTR

2013-08-14 Thread Dan Carpenter
On Wed, Aug 14, 2013 at 10:24:36PM +0900, Jaegeuk Kim wrote: > Hi Dan, > > Agreed. > Could you make a patch that covers other alloc_page cases too? Sure. Thanks for catching that. I will resend a v2 of this one which fixes those as well. regards, d

[f2fs-dev] [patch] f2fs: alloc_page() doesn't return an ERR_PTR

2013-08-14 Thread Dan Carpenter
alloc_page() returns a NULL on failure, it never returns an ERR_PTR. Signed-off-by: Dan Carpenter diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index f5172e2..3e87fe0 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1515,8 +1515,8 @@ int restore_node_summary(struct f2fs_sb_info *sbi

[f2fs-dev] [patch] f2fs: remove an unneeded kfree(NULL)

2013-07-31 Thread Dan Carpenter
This kfree() is no longer needed after a79dc083d7 "f2fs: move bio_private allocation out of f2fs_bio_alloc()". The "bio->bi_private" is NULL here so it's a no-op. Signed-off-by: Dan Carpenter --- Only needed in linux-next. diff --git a/fs/f2fs/data.c b/fs/f2fs/d

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

2013-05-26 Thread Dan Carpenter
On Sun, May 26, 2013 at 05:05:15PM +0200, walter harms wrote: > > > Am 23.05.2013 12:02, schrieb Dan Carpenter: > > There is an error path where "dir" is an ERR_PTR. > > > > Signed-off-by: Dan Carpenter > > > > diff --git a/fs/f2fs/recovery.

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

2013-05-24 Thread Dan Carpenter
t; addresses > Cc: linux-fsde...@vger.kernel.org, linux-ker...@vger.kernel.org, > linux-f2fs-devel@lists.sourceforge.net > > The on-disk block address is defined as __le32, but in-memory block > address, > block_t, does as u64. > > Let's synchronize them to 32 bits. >

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

2013-05-23 Thread Dan Carpenter
ro should probably be: #define NEW_ADDR ((block_t)-1) I'm not able to test this so there may be some reason why changing this breaks something. In that case we could do: #define NEW_ADDR ((u32)(block_t)-1) /* ex

[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, st