Unverified Commit 55a03c12 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14588 smb: Initialize cfid->tcon before performing network ops

parents 3244b551 a8d5c15e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
		}
	}
	cfid->dentry = dentry;
	cfid->tcon = tcon;

	/*
	 * We do not hold the lock for the open because in case
@@ -292,7 +293,6 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
		}
		goto oshr_free;
	}
	cfid->tcon = tcon;
	cfid->is_open = true;

	spin_lock(&cfids->cfid_list_lock);