File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -692,14 +692,15 @@ static int ocfs2_local_read_info(struct super_block *sb, int type)
692
692
int status ;
693
693
struct buffer_head * bh = NULL ;
694
694
struct ocfs2_quota_recovery * rec ;
695
- int locked = 0 ;
695
+ int locked = 0 , global_read = 0 ;
696
696
697
697
info -> dqi_max_spc_limit = 0x7fffffffffffffffLL ;
698
698
info -> dqi_max_ino_limit = 0x7fffffffffffffffLL ;
699
699
oinfo = kmalloc (sizeof (struct ocfs2_mem_dqinfo ), GFP_NOFS );
700
700
if (!oinfo ) {
701
701
mlog (ML_ERROR , "failed to allocate memory for ocfs2 quota"
702
702
" info." );
703
+ status = - ENOMEM ;
703
704
goto out_err ;
704
705
}
705
706
info -> dqi_priv = oinfo ;
@@ -712,6 +713,7 @@ static int ocfs2_local_read_info(struct super_block *sb, int type)
712
713
status = ocfs2_global_read_info (sb , type );
713
714
if (status < 0 )
714
715
goto out_err ;
716
+ global_read = 1 ;
715
717
716
718
status = ocfs2_inode_lock (lqinode , & oinfo -> dqi_lqi_bh , 1 );
717
719
if (status < 0 ) {
@@ -782,10 +784,12 @@ static int ocfs2_local_read_info(struct super_block *sb, int type)
782
784
if (locked )
783
785
ocfs2_inode_unlock (lqinode , 1 );
784
786
ocfs2_release_local_quota_bitmaps (& oinfo -> dqi_chunk );
787
+ if (global_read )
788
+ cancel_delayed_work_sync (& oinfo -> dqi_sync_work );
785
789
kfree (oinfo );
786
790
}
787
791
brelse (bh );
788
- return -1 ;
792
+ return status ;
789
793
}
790
794
791
795
/* Write local info to quota file */
You can’t perform that action at this time.
0 commit comments