diff options
author | Jaakko Heinonen <jh@FreeBSD.org> | 2010-01-13 14:17:21 +0000 |
---|---|---|
committer | Jaakko Heinonen <jh@FreeBSD.org> | 2010-01-13 14:17:21 +0000 |
commit | 5364a38dba0f16a7889430b625984c8a956d48ee (patch) | |
tree | 9cefcd12d57c45a2ad4078270ee3300cacefacdd /sys/fs/tmpfs | |
parent | 41e160536a1312617c8678997dff309a9c2a89d7 (diff) | |
download | src-5364a38dba0f16a7889430b625984c8a956d48ee.tar.gz src-5364a38dba0f16a7889430b625984c8a956d48ee.zip |
- Fix some style bugs in tmpfs_mount(). [1]
- Remove a stale comment about tmpfs_mem_info() 'total' argument.
Reported by: bde [1]
Notes
Notes:
svn path=/head/; revision=202187
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs.h | 4 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 14 |
2 files changed, 7 insertions, 11 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 1edbc415106b..04b1a06cd249 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -493,10 +493,6 @@ int tmpfs_truncate(struct vnode *, off_t); * Returns information about the number of available memory pages, * 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 * excessive memory usage. * diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index d18bccd9c882..e80e5afee624 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -185,15 +185,15 @@ tmpfs_mount(struct mount *mp) ino_t nodes; int error; /* Size counters. */ - ino_t nodes_max; - u_quad_t size_max; + ino_t nodes_max; + u_quad_t size_max; /* Root node attributes. */ - uid_t root_uid; - gid_t root_gid; - mode_t root_mode; + uid_t root_uid; + gid_t root_gid; + mode_t root_mode; - struct vattr va; + struct vattr va; if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts)) return (EINVAL); @@ -239,7 +239,7 @@ tmpfs_mount(struct mount *mp) * allowed to use, based on the maximum size the user passed in * the mount structure. A value of zero is treated as if the * 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; else pages = howmany(size_max, PAGE_SIZE); |