diff options
| -rw-r--r-- | fs/xfs/xfs_dquot.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index 8848b397e7a8..f89f7b5241e6 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
| @@ -733,10 +733,15 @@ xfs_dq_get_next_id( | |||
| 733 | return error; | 733 | return error; |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | if (xfs_iext_lookup_extent(quotip, "ip->i_df, start, &idx, &got)) | 736 | if (xfs_iext_lookup_extent(quotip, "ip->i_df, start, &idx, &got)) { |
| 737 | /* contiguous chunk, bump startoff for the id calculation */ | ||
| 738 | if (got.br_startoff < start) | ||
| 739 | got.br_startoff = start; | ||
| 737 | *id = got.br_startoff * mp->m_quotainfo->qi_dqperchunk; | 740 | *id = got.br_startoff * mp->m_quotainfo->qi_dqperchunk; |
| 738 | else | 741 | } else { |
| 739 | error = -ENOENT; | 742 | error = -ENOENT; |
| 743 | } | ||
| 744 | |||
| 740 | xfs_iunlock(quotip, lock_flags); | 745 | xfs_iunlock(quotip, lock_flags); |
| 741 | 746 | ||
| 742 | return error; | 747 | return error; |
