Skip to content
Snippets Groups Projects
Commit c68e7ec5 authored by youngjun's avatar youngjun Committed by Miklos Szeredi
Browse files

ovl: remove ovl_map_dev_ino() return value


ovl_map_dev_ino() always returns success.  Remove unnecessary return value.

Signed-off-by: default avataryoungjun <her0gyugyu@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent d7b49b10
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ out: ...@@ -95,7 +95,7 @@ out:
return err; return err;
} }
static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid) static void ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
{ {
bool samefs = ovl_same_fs(dentry->d_sb); bool samefs = ovl_same_fs(dentry->d_sb);
unsigned int xinobits = ovl_xino_bits(dentry->d_sb); unsigned int xinobits = ovl_xino_bits(dentry->d_sb);
...@@ -108,7 +108,7 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid) ...@@ -108,7 +108,7 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
* which is friendly to du -x. * which is friendly to du -x.
*/ */
stat->dev = dentry->d_sb->s_dev; stat->dev = dentry->d_sb->s_dev;
return 0; return;
} else if (xinobits) { } else if (xinobits) {
/* /*
* All inode numbers of underlying fs should not be using the * All inode numbers of underlying fs should not be using the
...@@ -122,7 +122,7 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid) ...@@ -122,7 +122,7 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
if (likely(!(stat->ino >> xinoshift))) { if (likely(!(stat->ino >> xinoshift))) {
stat->ino |= ((u64)fsid) << (xinoshift + 1); stat->ino |= ((u64)fsid) << (xinoshift + 1);
stat->dev = dentry->d_sb->s_dev; stat->dev = dentry->d_sb->s_dev;
return 0; return;
} else if (ovl_xino_warn(dentry->d_sb)) { } else if (ovl_xino_warn(dentry->d_sb)) {
pr_warn_ratelimited("inode number too big (%pd2, ino=%llu, xinobits=%d)\n", pr_warn_ratelimited("inode number too big (%pd2, ino=%llu, xinobits=%d)\n",
dentry, stat->ino, xinobits); dentry, stat->ino, xinobits);
...@@ -151,8 +151,6 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid) ...@@ -151,8 +151,6 @@ static int ovl_map_dev_ino(struct dentry *dentry, struct kstat *stat, int fsid)
*/ */
stat->dev = OVL_FS(dentry->d_sb)->fs[fsid].pseudo_dev; stat->dev = OVL_FS(dentry->d_sb)->fs[fsid].pseudo_dev;
} }
return 0;
} }
int ovl_getattr(struct user_namespace *mnt_userns, const struct path *path, int ovl_getattr(struct user_namespace *mnt_userns, const struct path *path,
...@@ -251,9 +249,7 @@ int ovl_getattr(struct user_namespace *mnt_userns, const struct path *path, ...@@ -251,9 +249,7 @@ int ovl_getattr(struct user_namespace *mnt_userns, const struct path *path,
} }
} }
err = ovl_map_dev_ino(dentry, stat, fsid); ovl_map_dev_ino(dentry, stat, fsid);
if (err)
goto out;
/* /*
* It's probably not worth it to count subdirs to get the * It's probably not worth it to count subdirs to get the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment