aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/sufile.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/sufile.c')
-rw-r--r--fs/nilfs2/sufile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c
index b3674a8162a1..cc714c72b138 100644
--- a/fs/nilfs2/sufile.c
+++ b/fs/nilfs2/sufile.c
@@ -446,6 +446,7 @@ int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat)
446{ 446{
447 struct buffer_head *header_bh; 447 struct buffer_head *header_bh;
448 struct nilfs_sufile_header *header; 448 struct nilfs_sufile_header *header;
449 struct the_nilfs *nilfs = NILFS_MDT(sufile)->mi_nilfs;
449 void *kaddr; 450 void *kaddr;
450 int ret; 451 int ret;
451 452
@@ -460,8 +461,11 @@ int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat)
460 sustat->ss_nsegs = nilfs_sufile_get_nsegments(sufile); 461 sustat->ss_nsegs = nilfs_sufile_get_nsegments(sufile);
461 sustat->ss_ncleansegs = le64_to_cpu(header->sh_ncleansegs); 462 sustat->ss_ncleansegs = le64_to_cpu(header->sh_ncleansegs);
462 sustat->ss_ndirtysegs = le64_to_cpu(header->sh_ndirtysegs); 463 sustat->ss_ndirtysegs = le64_to_cpu(header->sh_ndirtysegs);
463 sustat->ss_ctime = NILFS_MDT(sufile)->mi_nilfs->ns_ctime; 464 sustat->ss_ctime = nilfs->ns_ctime;
464 sustat->ss_nongc_ctime = NILFS_MDT(sufile)->mi_nilfs->ns_nongc_ctime; 465 sustat->ss_nongc_ctime = nilfs->ns_nongc_ctime;
466 spin_lock(&nilfs->ns_last_segment_lock);
467 sustat->ss_prot_seq = nilfs->ns_prot_seq;
468 spin_unlock(&nilfs->ns_last_segment_lock);
465 kunmap_atomic(kaddr, KM_USER0); 469 kunmap_atomic(kaddr, KM_USER0);
466 brelse(header_bh); 470 brelse(header_bh);
467 471