diff options
author | Steve French <sfrench@us.ibm.com> | 2010-05-13 18:19:32 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-05-13 18:19:32 -0400 |
commit | baa456331738b4e76a92318b62b354377a30ad80 (patch) | |
tree | 75c828a7c8a9f1b5f7f41b2e53271eafb7e561ef /fs/cifs/cifsfs.c | |
parent | aa3e5572c538d753dce11bf93532a75f95d22b40 (diff) | |
parent | 4462dc02842698f173f518c1f5ce79c0fb89395a (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
fs/cifs/inode.c
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 833166372a08..78c02eb4cb1f 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -97,6 +97,12 @@ cifs_read_super(struct super_block *sb, void *data, | |||
97 | if (cifs_sb == NULL) | 97 | if (cifs_sb == NULL) |
98 | return -ENOMEM; | 98 | return -ENOMEM; |
99 | 99 | ||
100 | rc = bdi_setup_and_register(&cifs_sb->bdi, "cifs", BDI_CAP_MAP_COPY); | ||
101 | if (rc) { | ||
102 | kfree(cifs_sb); | ||
103 | return rc; | ||
104 | } | ||
105 | |||
100 | #ifdef CONFIG_CIFS_DFS_UPCALL | 106 | #ifdef CONFIG_CIFS_DFS_UPCALL |
101 | /* copy mount params to sb for use in submounts */ | 107 | /* copy mount params to sb for use in submounts */ |
102 | /* BB: should we move this after the mount so we | 108 | /* BB: should we move this after the mount so we |
@@ -109,6 +115,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
109 | int len = strlen(data); | 115 | int len = strlen(data); |
110 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); | 116 | cifs_sb->mountdata = kzalloc(len + 1, GFP_KERNEL); |
111 | if (cifs_sb->mountdata == NULL) { | 117 | if (cifs_sb->mountdata == NULL) { |
118 | bdi_destroy(&cifs_sb->bdi); | ||
112 | kfree(sb->s_fs_info); | 119 | kfree(sb->s_fs_info); |
113 | sb->s_fs_info = NULL; | 120 | sb->s_fs_info = NULL; |
114 | return -ENOMEM; | 121 | return -ENOMEM; |
@@ -128,6 +135,7 @@ cifs_read_super(struct super_block *sb, void *data, | |||
128 | 135 | ||
129 | sb->s_magic = CIFS_MAGIC_NUMBER; | 136 | sb->s_magic = CIFS_MAGIC_NUMBER; |
130 | sb->s_op = &cifs_super_ops; | 137 | sb->s_op = &cifs_super_ops; |
138 | sb->s_bdi = &cifs_sb->bdi; | ||
131 | /* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512) | 139 | /* if (cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512) |
132 | sb->s_blocksize = | 140 | sb->s_blocksize = |
133 | cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */ | 141 | cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */ |
@@ -173,6 +181,7 @@ out_mount_failed: | |||
173 | } | 181 | } |
174 | #endif | 182 | #endif |
175 | unload_nls(cifs_sb->local_nls); | 183 | unload_nls(cifs_sb->local_nls); |
184 | bdi_destroy(&cifs_sb->bdi); | ||
176 | kfree(cifs_sb); | 185 | kfree(cifs_sb); |
177 | } | 186 | } |
178 | return rc; | 187 | return rc; |
@@ -204,6 +213,7 @@ cifs_put_super(struct super_block *sb) | |||
204 | #endif | 213 | #endif |
205 | 214 | ||
206 | unload_nls(cifs_sb->local_nls); | 215 | unload_nls(cifs_sb->local_nls); |
216 | bdi_destroy(&cifs_sb->bdi); | ||
207 | kfree(cifs_sb); | 217 | kfree(cifs_sb); |
208 | 218 | ||
209 | unlock_kernel(); | 219 | unlock_kernel(); |