We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 130737b commit f3c1f2dCopy full SHA for f3c1f2d
fs/cifs/cifsfs.c
@@ -266,18 +266,18 @@ static void cifs_kill_sb(struct super_block *sb)
266
* before we kill the sb.
267
*/
268
if (cifs_sb->root) {
269
- node = rb_first(root);
270
- while (node != NULL) {
+ for (node = rb_first(root); node; node = rb_next(node)) {
271
tlink = rb_entry(node, struct tcon_link, tl_rbnode);
272
tcon = tlink_tcon(tlink);
+ if (IS_ERR(tcon))
273
+ continue;
274
cfid = &tcon->crfid;
275
mutex_lock(&cfid->fid_mutex);
276
if (cfid->dentry) {
277
dput(cfid->dentry);
278
cfid->dentry = NULL;
279
}
280
mutex_unlock(&cfid->fid_mutex);
- node = rb_next(node);
281
282
283
/* finally release root dentry */
0 commit comments