> error = xfs_buf_find(target, map, nmaps, flags, NULL, &bp); > - > switch (error) { > case 0: > /* cache hit */ > goto found; > - case -EAGAIN: > - /* cache hit, trylock failure, caller handles failure */ > - ASSERT(flags & XBF_TRYLOCK); > - return NULL; > case -ENOENT: > /* cache miss, go for insert */ > break; > + case -EAGAIN: > + /* cache hit, trylock failure, caller handles failure */ > + ASSERT(flags & XBF_TRYLOCK); > + /* fall through */ > case -EFSCORRUPTED: > default: > - /* > - * None of the higher layers understand failure types > - * yet, so return NULL to signal a fatal lookup error. > - */ > - return NULL; > + return error; I think two little if statements would be cleaner with two ifs instead of the switch statement: if (!error) goto found; if (error != -ENOENT) return error; Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>