diff options
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 6da3b19..7587272 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -246,8 +246,7 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) unsigned long bss_size; char *library; ssize_t aresid; - int error; - int locked; + int error, locked, writecount; LCONVPATHEXIST(td, args->library, &library); @@ -277,7 +276,10 @@ linux_uselib(struct thread *td, struct linux_uselib_args *args) locked = 1; /* Writable? */ - if (vp->v_writecount) { + error = VOP_GET_WRITECOUNT(vp, &writecount); + if (error != 0) + goto cleanup; + if (writecount != 0) { error = ETXTBSY; goto cleanup; } |