staging: exfat: Clean up return codes - FFS_NOTFOUND

Convert FFS_NOTFOUND to -ENOENT

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20191024155327.1095907-3-Valdis.Kletnieks@vt.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Valdis Kletnieks 2019-10-24 11:53:13 -04:00 committed by Greg Kroah-Hartman
parent 2f2e28866b
commit 67f8224c3b
2 changed files with 3 additions and 4 deletions

View File

@ -216,7 +216,6 @@ static inline u16 get_row_index(u16 i)
#define FFS_SEMAPHOREERR 6
#define FFS_INVALIDPATH 7
#define FFS_INVALIDFID 8
#define FFS_NOTFOUND 9
#define FFS_FILEEXIST 10
#define FFS_PERMISSIONERR 11
#define FFS_NOTOPENED 12

View File

@ -578,7 +578,7 @@ static int ffsLookupFile(struct inode *inode, char *path, struct file_id_t *fid)
dentry = p_fs->fs_func->find_dir_entry(sb, &dir, &uni_name, num_entries,
&dos_name, TYPE_ALL);
if (dentry < -1) {
ret = FFS_NOTFOUND;
ret = -ENOENT;
goto out;
}
@ -2701,7 +2701,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -ENOTEMPTY;
else if (err == FFS_NOTFOUND)
else if (err == -ENOENT)
err = -ENOENT;
else if (err == FFS_DIRBUSY)
err = -EBUSY;
@ -2758,7 +2758,7 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -EEXIST;
else if (err == FFS_NOTFOUND)
else if (err == -ENOENT)
err = -ENOENT;
else if (err == -ENOSPC)
err = -ENOSPC;