Re: [PATCH 1/4] hugetlbfs: move free_inodes accounting
From: Dave Hansen <hidden>
Date: 2005-09-21 19:35:21
Also in:
linux-fsdevel
From: Dave Hansen <hidden>
Date: 2005-09-21 19:35:21
Also in:
linux-fsdevel
On Wed, 2005-09-21 at 11:21 +0200, Christoph Hellwig wrote:
+static inline int hugetlbfs_inc_free_inodes(struct hugetlbfs_sb_info
*sbinfo)
+{
+ if (sbinfo->free_inodes >= 0) {
+ spin_lock(&sbinfo->stat_lock);
+ if (unlikely(!sbinfo->free_inodes)) {
+ spin_unlock(&sbinfo->stat_lock);
+ return 0;
+ }
+ sbinfo->free_inodes--;
+ spin_unlock(&sbinfo->stat_lock);
+ }Does that really need the unlikely()? Doesn't seem horribly performance critical. -- Dave -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>