Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109383961
D37024.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D37024.diff
View Options
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -350,17 +350,17 @@
return (meta_pages + tmp->tm_pages_used);
}
-static size_t
+static bool
tmpfs_pages_check_avail(struct tmpfs_mount *tmp, size_t req_pages)
{
if (tmpfs_mem_avail() < req_pages)
- return (0);
+ return (false);
if (tmp->tm_pages_max != ULONG_MAX &&
tmp->tm_pages_max < req_pages + tmpfs_pages_used(tmp))
- return (0);
+ return (false);
- return (1);
+ return (true);
}
static int
@@ -468,7 +468,7 @@
if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
return (ENOSPC);
- if (tmpfs_pages_check_avail(tmp, 1) == 0)
+ if (!tmpfs_pages_check_avail(tmp, 1))
return (ENOSPC);
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
@@ -1737,7 +1737,7 @@
}
if (newpages > oldpages &&
- tmpfs_pages_check_avail(tmp, newpages - oldpages) == 0)
+ !tmpfs_pages_check_avail(tmp, newpages - oldpages))
return (ENOSPC);
VM_OBJECT_WLOCK(uobj);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 8:53 AM (12 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16471145
Default Alt Text
D37024.diff (1 KB)
Attached To
Mode
D37024: tmpfs: implement FIOSEEKDATA and FIOSEEKHOLE
Attached
Detach File
Event Timeline
Log In to Comment