Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5c6dd4e authored by Richard Weinberger's avatar Richard Weinberger Committed by Linus Torvalds
Browse files

hostfs: code cleanups



Some code cleanups for hostfs.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent be76d81f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ void *open_dir(char *path, int *err_out)

	dir = opendir(path);
	*err_out = errno;
	if (dir == NULL)
		return NULL;

	return dir;
}

@@ -205,7 +204,7 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd)
	if (attrs->ia_valid & HOSTFS_ATTR_MODE) {
		if (fd >= 0) {
			if (fchmod(fd, attrs->ia_mode) != 0)
				return (-errno);
				return -errno;
		} else if (chmod(file, attrs->ia_mode) != 0) {
			return -errno;
		}