fiemap: fix problem with setting FIEMAP_EXTENT_LAST
commit2dedbbdc1986ce130bfa6fe3cf54d2da057e6d5a
authorJosef Bacik <jbacik@redhat.com>
Wed, 6 May 2009 23:02:53 +0000 (6 16:02 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 May 2009 23:34:27 +0000 (18 16:34 -0700)
tree42c4666ce78e001b7a2b5af48de8024a9ac79c5e
parente18346d68f807c62bb8e5de0f809d3a1a2f093de
fiemap: fix problem with setting FIEMAP_EXTENT_LAST

commit df3935ffd6166fdd00702cf548fb5bb55737758b upstream.

Fix a problem where the generic block based fiemap stuff would not
properly set FIEMAP_EXTENT_LAST on the last extent.  I've reworked things
to keep track if we go past the EOF, and mark the last extent properly.
The problem was reported by and tested by Eric Sandeen.

Tested-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Josef Bacik <jbacik@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: <xfs-masters@oss.sgi.com>
Cc: <linux-btrfs@vger.kernel.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <Joel.Becker@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ioctl.c