Re: [PATCH RFC] vfs: make fstatat retry on ESTALE errors fromgetattr call

From: Jim Rees
Date: Fri Apr 13 2012 - 08:09:44 EST


Jeff Layton wrote:

+retry:
error = user_path_at(dfd, filename, lookup_flags, &path);
if (error)
goto out;

error = vfs_getattr(path.mnt, path.dentry, stat);
+ should_retry = error == -ESTALE ? retry_estale(path.dentry) : false;
path_put(&path);
+ if (should_retry) {
+ lookup_flags |= LOOKUP_REVAL;
+ goto retry;
+ }
out:
return error;
}

This is starting to look like FORTRAN. Maybe turn this into a "do while"?
Then you could make the "goto out" into a break and get rid of them both.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/