diff options
| -rw-r--r-- | fs/gfs2/rgrp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 8d9c08b5c4b6..2ce48d4f2465 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include "trans.h" | 27 | #include "trans.h" |
| 28 | #include "ops_file.h" | 28 | #include "ops_file.h" |
| 29 | #include "util.h" | 29 | #include "util.h" |
| 30 | #include "log.h" | ||
| 30 | 31 | ||
| 31 | #define BFITNOENT ((u32)~0) | 32 | #define BFITNOENT ((u32)~0) |
| 32 | 33 | ||
| @@ -941,9 +942,13 @@ static int get_local_rgrp(struct gfs2_inode *ip) | |||
| 941 | rgd = gfs2_rgrpd_get_first(sdp); | 942 | rgd = gfs2_rgrpd_get_first(sdp); |
| 942 | 943 | ||
| 943 | if (rgd == begin) { | 944 | if (rgd == begin) { |
| 944 | if (++loops >= 2 || !skipped) | 945 | if (++loops >= 3) |
| 945 | return -ENOSPC; | 946 | return -ENOSPC; |
| 947 | if (!skipped) | ||
| 948 | loops++; | ||
| 946 | flags = 0; | 949 | flags = 0; |
| 950 | if (loops == 2) | ||
| 951 | gfs2_log_flush(sdp, NULL); | ||
| 947 | } | 952 | } |
| 948 | } | 953 | } |
| 949 | 954 | ||
