Skip to content

Commit

Permalink
hostfs: code cleanups
Browse files Browse the repository at this point in the history
Some code cleanups for hostfs.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Richard Weinberger authored and Linus Torvalds committed Oct 26, 2010
1 parent be76d81 commit c5c6dd4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/hostfs/hostfs_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit c5c6dd4

Please sign in to comment.