From ecbc9e989f62e59cdd3e87b1e7babacc765041ba Mon Sep 17 00:00:00 2001 From: Valdis Kletnieks Date: Mon, 11 Nov 2019 21:09:57 -0500 Subject: staging: exfat: Correct return code Use -ENOTEMPTY rather than -EEXIST for attempting to remove a directory that still has files in it. Signed-off-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191112021000.42091-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman --- drivers/staging/exfat/exfat_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 3e13e002cd14..4c8afe60d48b 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -2167,7 +2167,7 @@ static int ffsRemoveDir(struct inode *inode, struct file_id_t *fid) clu_to_free.flags = fid->flags; if (!is_dir_empty(sb, &clu_to_free)) { - ret = -EEXIST; + ret = -ENOTEMPTY; goto out; } -- cgit v1.2.3