summaryrefslogtreecommitdiffstats
path: root/fs/afs/super.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-05-14 07:23:43 -0400
committerDavid Howells <dhowells@redhat.com>2019-05-16 17:23:21 -0400
commitb8359153252d4465cb74f8de6c50e8c6295cbe2e (patch)
tree5ec539b6936cde10dc725cbc90acff2220c0f814 /fs/afs/super.c
parenta38a75581e6e2f783e7b8658e9ca5d4243279f55 (diff)
afs: Pass pre-fetch server and volume break counts into afs_iget5_set()
Pass the server and volume break counts from before the status fetch operation that queried the attributes of a file into afs_iget5_set() so that the new vnode's break counters can be initialised appropriately. This allows detection of a volume or server break that happened whilst we were fetching the status or setting up the vnode. Fixes: c435ee34551e ("afs: Overhaul the callback handling") Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/super.c')
-rw-r--r--fs/afs/super.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c
index f76473ad7bbb..f18911e8d770 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -426,7 +426,7 @@ static int afs_set_super(struct super_block *sb, struct fs_context *fc)
426static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx) 426static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
427{ 427{
428 struct afs_super_info *as = AFS_FS_S(sb); 428 struct afs_super_info *as = AFS_FS_S(sb);
429 struct afs_fid fid; 429 struct afs_iget_data iget_data;
430 struct inode *inode = NULL; 430 struct inode *inode = NULL;
431 int ret; 431 int ret;
432 432
@@ -451,11 +451,13 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
451 } else { 451 } else {
452 sprintf(sb->s_id, "%llu", as->volume->vid); 452 sprintf(sb->s_id, "%llu", as->volume->vid);
453 afs_activate_volume(as->volume); 453 afs_activate_volume(as->volume);
454 fid.vid = as->volume->vid; 454 iget_data.fid.vid = as->volume->vid;
455 fid.vnode = 1; 455 iget_data.fid.vnode = 1;
456 fid.vnode_hi = 0; 456 iget_data.fid.vnode_hi = 0;
457 fid.unique = 1; 457 iget_data.fid.unique = 1;
458 inode = afs_iget(sb, ctx->key, &fid, NULL, NULL, NULL); 458 iget_data.cb_v_break = as->volume->cb_v_break;
459 iget_data.cb_s_break = 0;
460 inode = afs_iget(sb, ctx->key, &iget_data, NULL, NULL, NULL);
459 } 461 }
460 462
461 if (IS_ERR(inode)) 463 if (IS_ERR(inode))