diff options
author | Ori Bernstein <ori@eigenstate.org> | 2022-07-30 16:09:27 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2022-07-30 16:09:27 +0000 |
commit | 30dcf55ee221b986aee6d428b4da431f6174c66b (patch) | |
tree | adb2848544d8b55bbbc1c72e598cbfd276c17aac /sys/src/9/port | |
parent | 7a225e5331749e1c656661f7c1c5cc2767aa13d8 (diff) |
bind, mount: stop returning mount id
The mount ID is a sequence number in a 32 bit integer, which means that
it can't be unique. This is largely harmless, because there is no way to
use the mount id, beyond checking if it's negative.
However, there's no overflow check, so the mount ID can wrap negative,
which will break error checks on mount calls.
Because it's useless, let's just stop returning it.
Diffstat (limited to 'sys/src/9/port')
-rw-r--r-- | sys/src/9/port/chan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/9/port/chan.c b/sys/src/9/port/chan.c index 04d072ea4..c258e8f80 100644 --- a/sys/src/9/port/chan.c +++ b/sys/src/9/port/chan.c @@ -745,13 +745,12 @@ cmount(Chan *new, Chan *old, int flag, char *spec) } m->mount = nm; } - order = nm->mountid; wunlock(&m->lock); wunlock(&pg->ns); mountfree(um); - return order; + return 0; } void |