diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2009-07-26 21:52:01 -0500 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-07-31 00:56:58 -0500 |
commit | 97db39a1f6f69e906e98118392400de5217aa33a (patch) | |
tree | f5735b99542d8d31dcad907294c5cf7a0657b563 /fs/xattr.c | |
parent | fd40261354802b0f05f6f67121235aa002e87069 (diff) | |
download | talos-op-linux-97db39a1f6f69e906e98118392400de5217aa33a.tar.gz talos-op-linux-97db39a1f6f69e906e98118392400de5217aa33a.zip |
xfs: reduce bmv_count in xfs_vn_fiemap
commit 6321e3ed2acf3ee9643cdd403e1c88605d7944ba caused
the full bmv_count's worth of getbmapx structures to get
allocated; telling it to do MAXEXTNUM was a bit insane,
resulting in ENOMEM every time.
Chop it down to something reasonable, the number of slots
in the caller's input buffer. If this is too large the
caller may get ENOMEM but the reason should not be a
mystery, and they can try again with something smaller.
We add 1 to the value because in the normal getbmap
world, bmv_count includes the header and xfs_getbmap does:
nex = bmv->bmv_count - 1;
if (nex <= 0)
return XFS_ERROR(EINVAL);
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Diffstat (limited to 'fs/xattr.c')
0 files changed, 0 insertions, 0 deletions