mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 09:02:44 +00:00
- Fix some style bugs in tmpfs_mount(). [1]
- Remove a stale comment about tmpfs_mem_info() 'total' argument. Reported by: bde [1]
This commit is contained in:
parent
41e160536a
commit
5364a38dba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202187
@ -493,10 +493,6 @@ int tmpfs_truncate(struct vnode *, off_t);
|
|||||||
* Returns information about the number of available memory pages,
|
* Returns information about the number of available memory pages,
|
||||||
* including physical and virtual ones.
|
* including physical and virtual ones.
|
||||||
*
|
*
|
||||||
* If 'total' is TRUE, the value returned is the total amount of memory
|
|
||||||
* pages configured for the system (either in use or free).
|
|
||||||
* If it is FALSE, the value returned is the amount of free memory pages.
|
|
||||||
*
|
|
||||||
* Remember to remove TMPFS_PAGES_RESERVED from the returned value to avoid
|
* Remember to remove TMPFS_PAGES_RESERVED from the returned value to avoid
|
||||||
* excessive memory usage.
|
* excessive memory usage.
|
||||||
*
|
*
|
||||||
|
@ -185,15 +185,15 @@ tmpfs_mount(struct mount *mp)
|
|||||||
ino_t nodes;
|
ino_t nodes;
|
||||||
int error;
|
int error;
|
||||||
/* Size counters. */
|
/* Size counters. */
|
||||||
ino_t nodes_max;
|
ino_t nodes_max;
|
||||||
u_quad_t size_max;
|
u_quad_t size_max;
|
||||||
|
|
||||||
/* Root node attributes. */
|
/* Root node attributes. */
|
||||||
uid_t root_uid;
|
uid_t root_uid;
|
||||||
gid_t root_gid;
|
gid_t root_gid;
|
||||||
mode_t root_mode;
|
mode_t root_mode;
|
||||||
|
|
||||||
struct vattr va;
|
struct vattr va;
|
||||||
|
|
||||||
if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts))
|
if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts))
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp)
|
|||||||
* allowed to use, based on the maximum size the user passed in
|
* allowed to use, based on the maximum size the user passed in
|
||||||
* the mount structure. A value of zero is treated as if the
|
* the mount structure. A value of zero is treated as if the
|
||||||
* maximum available space was requested. */
|
* maximum available space was requested. */
|
||||||
if (size_max < PAGE_SIZE || size_max > (SIZE_MAX - PAGE_SIZE))
|
if (size_max < PAGE_SIZE || size_max > SIZE_MAX - PAGE_SIZE)
|
||||||
pages = SIZE_MAX;
|
pages = SIZE_MAX;
|
||||||
else
|
else
|
||||||
pages = howmany(size_max, PAGE_SIZE);
|
pages = howmany(size_max, PAGE_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user