On Tue, May 22, 2018 at 09:59:50AM -0700, Omar Sandoval wrote: > From: Omar Sandoval <osan...@fb.com> > > btrfs_truncate() uses two variables for error handling, ret and err (if > this sounds familiar, it's because btrfs_truncate_inode_items() did > something similar). This is error prone, as was made evident by "Btrfs: > fix error handling in btrfs_truncate()". We only have err because we > don't want to mask an error if we call btrfs_update_inode() and > btrfs_end_transaction(), so let's make that its own scoped return > variable and use ret everywhere else. > > Reviewed-by: Nikolay Borisov <nbori...@suse.com> > Signed-off-by: Omar Sandoval <osan...@fb.com> > --- > This is the same as my v1 "Btrfs: fix error handling in > btrfs_truncate()", but rebased on top of kdave/for-next + v2 of "Btrfs: > fix error handling in btrfs_truncate()". > > fs/btrfs/inode.c | 33 ++++++++++++++------------------- > 1 file changed, 14 insertions(+), 19 deletions(-)
Dave, what are your thoughts on this one? Are you thinking 4.18 or 4.19? -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html