History

cifs: wait for tcon resource_id before getting fscache super

The logic for initializing tcon->resource_id is done inside cifs_root_iget. fscache super cookie relies on this for aux data. So we need to push the fscache initialization to this later point during mount.

Shyam Prasad N committed 4 years ago

Commit 5bf91ef1 parent 65de2623 files · +8 −7Browse files

Unified · Split

3 files
  1. fs/cifs/connect.c +0 −6
  2. fs/cifs/fscache.c +1 −1
  3. fs/cifs/inode.c +7 −0
fs/cifs/connect.c+0−6
@@ -3046,12 +3046,6 @@ static int mount_get_conns(struct mount_ctx *mnt_ctx) · 3045 unmodified lines
30463046 cifs_dbg(VFS, "read only mount of RW share\n");
30473047 /* no need to log a RW mount of a typical RW share */
30483048 }
3049− /*
3050− * The cookie is initialized from volume info returned above.
3051− * Inside cifs_fscache_get_super_cookie it checks
3052− * that we do not get super cookie twice.
3053− */
3054− cifs_fscache_get_super_cookie(tcon);
30553049 }
30563050
30573051 /*
fs/cifs/fscache.c+1−1
@@ -92,7 +92,7 @@ void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) · 91 unmodified lines
9292 * In the future, as we integrate with newer fscache features,
9393 * we may want to instead add a check if cookie has changed
9494 */
95− if (tcon->fscache == NULL)
95+ if (tcon->fscache)
9696 return;
9797
9898 sharename = extract_sharename(tcon->treeName);
fs/cifs/inode.c+7−0
@@ -1376,6 +1376,13 @@ iget_no_retry: · 1375 unmodified lines
13761376 inode = ERR_PTR(rc);
13771377 }
13781378
1379+ /*
1380+ * The cookie is initialized from volume info returned above.
1381+ * Inside cifs_fscache_get_super_cookie it checks
1382+ * that we do not get super cookie twice.
1383+ */
1384+ cifs_fscache_get_super_cookie(tcon);
1385+
13791386 out:
13801387 kfree(path);
13811388 free_xid(xid);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t