lkml.org 
[lkml]   [2019]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v7 08/24] erofs: add namei functions
    Hi!

    > + /*
    > + * on-disk error, let's only BUG_ON in the debugging mode.
    > + * otherwise, it will return 1 to just skip the invalid name
    > + * and go on (in consideration of the lookup performance).
    > + */
    > + DBG_BUGON(qd->name > qd->end);

    I believe you should check for errors in non-debug mode, too.


    > + if (unlikely(!ndirents)) {
    > + DBG_BUGON(1);
    > + kunmap_atomic(de);
    > + put_page(page);
    > + page = ERR_PTR(-EIO);
    > + goto out;
    > + }

    -EUCLEAN is right error code for corrupted filesystem. (And you
    probably want to print something to the syslog, too).

    Pavel
    --
    DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
    HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2019-08-13 13:49    [W:4.037 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site