ocfs2: make xattr extension work with new local alloc reservation.
authorTao Ma <tao.ma@oracle.com>
Fri, 9 Jul 2010 06:53:11 +0000 (14:53 +0800)
committerJoel Becker <joel.becker@oracle.com>
Mon, 12 Jul 2010 20:57:24 +0000 (13:57 -0700)
commita78f9f4668949a6588b8872f162e86685c63d023
treee4757b666f2c51f3e2f596a921d4f9fe13c2dbc1
parent0a463b74e7e6856b24e613de2b85237c6e11890b
ocfs2: make xattr extension work with new local alloc reservation.

The old ocfs2_xattr_extent_allocation is too optimistic about
the clusters we can get. So actually if the file system is
too fragmented, ocfs2_add_clusters_in_btree will return us
with EGAIN and we need to allocate clusters once again.

So this patch change it to a while loop so that we can allocate
clusters until we reach clusters_to_add.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Cc: stable@kernel.org
fs/ocfs2/xattr.c