diff options
Diffstat (limited to 'fs/hostfs')
-rw-r--r-- | fs/hostfs/hostfs_user.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c index 8d02683585e0..d51a98384bc0 100644 --- a/fs/hostfs/hostfs_user.c +++ b/fs/hostfs/hostfs_user.c | |||
@@ -94,8 +94,7 @@ void *open_dir(char *path, int *err_out) | |||
94 | 94 | ||
95 | dir = opendir(path); | 95 | dir = opendir(path); |
96 | *err_out = errno; | 96 | *err_out = errno; |
97 | if (dir == NULL) | 97 | |
98 | return NULL; | ||
99 | return dir; | 98 | return dir; |
100 | } | 99 | } |
101 | 100 | ||
@@ -205,7 +204,7 @@ int set_attr(const char *file, struct hostfs_iattr *attrs, int fd) | |||
205 | if (attrs->ia_valid & HOSTFS_ATTR_MODE) { | 204 | if (attrs->ia_valid & HOSTFS_ATTR_MODE) { |
206 | if (fd >= 0) { | 205 | if (fd >= 0) { |
207 | if (fchmod(fd, attrs->ia_mode) != 0) | 206 | if (fchmod(fd, attrs->ia_mode) != 0) |
208 | return (-errno); | 207 | return -errno; |
209 | } else if (chmod(file, attrs->ia_mode) != 0) { | 208 | } else if (chmod(file, attrs->ia_mode) != 0) { |
210 | return -errno; | 209 | return -errno; |
211 | } | 210 | } |