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
3046 cifs_dbg(VFS, "read only mount of RW share\n");3046 cifs_dbg(VFS, "read only mount of RW share\n");
3047 /* no need to log a RW mount of a typical RW share */3047 /* no need to log a RW mount of a typical RW share */
3048 }3048 }
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);
3055 }3049 }
3056 3050
3057 /*3051 /*
fs/cifs/fscache.c+1−1
@@ -92,7 +92,7 @@ void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) · 91 unmodified lines
92 * In the future, as we integrate with newer fscache features,92 * In the future, as we integrate with newer fscache features,
93 * we may want to instead add a check if cookie has changed93 * we may want to instead add a check if cookie has changed
94 */94 */
95 if (tcon->fscache == NULL)95 if (tcon->fscache)
96 return;96 return;
97 97
98 sharename = extract_sharename(tcon->treeName);98 sharename = extract_sharename(tcon->treeName);
fs/cifs/inode.c+7−0
@@ -1376,6 +1376,13 @@ iget_no_retry: · 1375 unmodified lines
1376 inode = ERR_PTR(rc);1376 inode = ERR_PTR(rc);
1377 }1377 }
1378 1378
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
1379out:1386out:
1380 kfree(path);1387 kfree(path);
1381 free_xid(xid);1388 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