提交 c5c6dd4e 编写于 作者: R Richard Weinberger 提交者: Linus Torvalds

hostfs: code cleanups

Some code cleanups for hostfs.
Signed-off-by: NRichard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 be76d81f
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册