Skip to content

Commit ca588d1

Browse files
committed
btrfs: rename error to ret in btrfs_may_delete()
Unify naming of return value to the preferred way. Reviewed-by: Daniel Vacek <neelx@suse.com>yy Signed-off-by: David Sterba <dsterba@suse.com>
1 parent ad4c6f3 commit ca588d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/btrfs/ioctl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
841841
static int btrfs_may_delete(struct mnt_idmap *idmap,
842842
struct inode *dir, struct dentry *victim, int isdir)
843843
{
844-
int error;
844+
int ret;
845845

846846
if (d_really_is_negative(victim))
847847
return -ENOENT;
@@ -851,9 +851,9 @@ static int btrfs_may_delete(struct mnt_idmap *idmap,
851851
return -EINVAL;
852852
audit_inode_child(dir, victim, AUDIT_TYPE_CHILD_DELETE);
853853

854-
error = inode_permission(idmap, dir, MAY_WRITE | MAY_EXEC);
855-
if (error)
856-
return error;
854+
ret = inode_permission(idmap, dir, MAY_WRITE | MAY_EXEC);
855+
if (ret)
856+
return ret;
857857
if (IS_APPEND(dir))
858858
return -EPERM;
859859
if (check_sticky(idmap, dir, d_inode(victim)) ||

0 commit comments

Comments
 (0)