Messages in this thread Patch in this message | | | Date | Mon, 23 Aug 2004 11:32:46 +0100 (BST) | From | Anton Altaparmakov <> | Subject | [PATCH 15/20] Re: [2.6-BK-URL] NTFS 2.1.17 release |
| |
This is patch 15/20 in the series. It contains the following ChangeSet:
<aia21@cantab.net> (04/08/17 1.1821) NTFS: Minor update to fs/ntfs/bitmap.c to only perform rollback if at least one bit has actually been changed.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Best regards,
Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
===================================================================
diff -Nru a/fs/ntfs/bitmap.c b/fs/ntfs/bitmap.c --- a/fs/ntfs/bitmap.c 2004-08-18 20:50:34 +01:00 +++ b/fs/ntfs/bitmap.c 2004-08-18 20:50:34 +01:00 @@ -115,7 +115,7 @@ len += pos; /* If we are not in the last page, deal with all subsequent pages. */ - while (end_index > index) { + while (index < end_index) { BUG_ON(cnt <= 0); /* Update @index and get the next page. */ @@ -168,8 +168,11 @@ */ if (is_rollback) return PTR_ERR(page); - pos = __ntfs_bitmap_set_bits_in_run(vi, start_bit, count - cnt, - value ? 0 : 1, TRUE); + if (count != cnt) + pos = __ntfs_bitmap_set_bits_in_run(vi, start_bit, count - cnt, + value ? 0 : 1, TRUE); + else + pos = 0; if (!pos) { /* Rollback was successful. */ ntfs_error(vi->i_sb, "Failed to map subsequent page (error " - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |