diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-05-03 17:18:09 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2009-05-05 17:43:24 -0400 |
commit | a46fa684fcb7001d79c97f2968696997b3b79064 (patch) | |
tree | ddd425db2bdf65385ee06a7225e43ea39ce801f9 /fs/ocfs2 | |
parent | b4348f32dae3cb6eb4bc21c7ed8f76c0b11e9d6a (diff) |
ocfs2: Don't printk the error when listing too many xattrs.
Currently the kernel defines XATTR_LIST_MAX as 65536
in include/linux/limits.h. This is the largest buffer that is used for
listing xattrs.
But with ocfs2 xattr tree, we actually have no limit for the number. If
filesystem has more names than can fit in the buffer, the kernel
logs will be pollluted with something like this when listing:
(27738,0):ocfs2_iterate_xattr_buckets:3158 ERROR: status = -34
(27738,0):ocfs2_xattr_tree_list_index_block:3264 ERROR: status = -34
So don't print "ERROR" message as this is not an ocfs2 error.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/xattr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 15631019dc63..ba320e250747 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -3154,7 +3154,7 @@ static int ocfs2_iterate_xattr_buckets(struct inode *inode, | |||
3154 | le32_to_cpu(bucket_xh(bucket)->xh_entries[0].xe_name_hash)); | 3154 | le32_to_cpu(bucket_xh(bucket)->xh_entries[0].xe_name_hash)); |
3155 | if (func) { | 3155 | if (func) { |
3156 | ret = func(inode, bucket, para); | 3156 | ret = func(inode, bucket, para); |
3157 | if (ret) | 3157 | if (ret && ret != -ERANGE) |
3158 | mlog_errno(ret); | 3158 | mlog_errno(ret); |
3159 | /* Fall through to bucket_relse() */ | 3159 | /* Fall through to bucket_relse() */ |
3160 | } | 3160 | } |
@@ -3261,7 +3261,8 @@ static int ocfs2_xattr_tree_list_index_block(struct inode *inode, | |||
3261 | ocfs2_list_xattr_bucket, | 3261 | ocfs2_list_xattr_bucket, |
3262 | &xl); | 3262 | &xl); |
3263 | if (ret) { | 3263 | if (ret) { |
3264 | mlog_errno(ret); | 3264 | if (ret != -ERANGE) |
3265 | mlog_errno(ret); | ||
3265 | goto out; | 3266 | goto out; |
3266 | } | 3267 | } |
3267 | 3268 | ||