Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/usr.sbin/puffs/mount_9p



Module Name:    src
Committed By:   martin
Date:           Tue Mar 15 10:00:14 UTC 2022

Modified Files:
        src/usr.sbin/puffs/mount_9p [netbsd-8]: node.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1738):

        usr.sbin/puffs/mount_9p/node.c: revision 1.30
        usr.sbin/puffs/mount_9p/node.c: revision 1.31

mount_9p: fix writing to a file opened with write-only mode

With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.

Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server.  Thus, a read
request to the file from the page cache fails.

So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.

Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.

 -

mount_9p: check returned type for Tread


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.40.1 src/usr.sbin/puffs/mount_9p/node.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index