Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254045
b: refs/heads/master
c: 5c4f1ad
h: refs/heads/master
i:
  254043: 8102e3d
v: v3
  • Loading branch information
Al Viro committed Jun 24, 2011
1 parent 4dc4762 commit 6eb9890
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa18f1bdce898f0efd0c8639c901d826d01be04f
refs/heads/master: 5c4f1ad7c6aa3b729bd3a93b80f9417d7e978c32
44 changes: 22 additions & 22 deletions trunk/fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,16 +656,13 @@ cifs_do_mount(struct file_system_type *fs_type,
cifs_sb = kzalloc(sizeof(struct cifs_sb_info), GFP_KERNEL);
if (cifs_sb == NULL) {
root = ERR_PTR(-ENOMEM);
unload_nls(volume_info->local_nls);
goto out;
goto out_nls;
}

cifs_sb->mountdata = kstrndup(data, PAGE_SIZE, GFP_KERNEL);
if (cifs_sb->mountdata == NULL) {
root = ERR_PTR(-ENOMEM);
unload_nls(volume_info->local_nls);
kfree(cifs_sb);
goto out;
goto out_cifs_sb;
}

cifs_setup_cifs_sb(volume_info, cifs_sb);
Expand All @@ -675,10 +672,7 @@ cifs_do_mount(struct file_system_type *fs_type,
if (!(flags & MS_SILENT))
cERROR(1, "cifs_mount failed w/return code = %d", rc);
root = ERR_PTR(rc);
unload_nls(volume_info->local_nls);
kfree(cifs_sb->mountdata);
kfree(cifs_sb);
goto out;
goto out_mountdata;
}

mnt_data.vol = volume_info;
Expand All @@ -695,22 +689,20 @@ cifs_do_mount(struct file_system_type *fs_type,
if (sb->s_root) {
cFYI(1, "Use existing superblock");
cifs_umount(cifs_sb);
goto out_shared;
}

sb->s_flags = flags;
/* BB should we make this contingent on mount parm? */
sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
} else {
sb->s_flags = flags;
/* BB should we make this contingent on mount parm? */
sb->s_flags |= MS_NODIRATIME | MS_NOATIME;

rc = cifs_read_super(sb);
if (rc) {
root = ERR_PTR(rc);
goto out_super;
}

rc = cifs_read_super(sb);
if (rc) {
root = ERR_PTR(rc);
goto out_super;
sb->s_flags |= MS_ACTIVE;
}

sb->s_flags |= MS_ACTIVE;

out_shared:
root = cifs_get_root(volume_info, sb);
if (root == NULL) {
root = ERR_PTR(-EINVAL); /* XXX */
Expand All @@ -725,6 +717,14 @@ cifs_do_mount(struct file_system_type *fs_type,
out:
cifs_cleanup_volume_info(&volume_info);
return root;

out_mountdata:
kfree(cifs_sb->mountdata);
out_cifs_sb:
kfree(cifs_sb);
out_nls:
unload_nls(volume_info->local_nls);
goto out;
}

static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
Expand Down

0 comments on commit 6eb9890

Please sign in to comment.