summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs/smbfs_smb.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-06-17 12:58:02 +0000
committertjr <tjr@FreeBSD.org>2003-06-17 12:58:02 +0000
commit6d534d8e046165eceeeee1a288da8f557d4aa386 (patch)
tree6b7cbb58c0fa43be160cb35cbea22eab90824a90 /sys/fs/smbfs/smbfs_smb.c
parentec215fe3e905337cba439b9419c1448ebbc5741f (diff)
downloadFreeBSD-src-6d534d8e046165eceeeee1a288da8f557d4aa386.zip
FreeBSD-src-6d534d8e046165eceeeee1a288da8f557d4aa386.tar.gz
Send the close request to the SMB server in smbfs_inactive(), instead of
smbfs_close(). This fixes paging to and from mmap()'d regions of smbfs files after the descriptor has been closed, and makes thttpd, GNU ld, and perhaps more things work that depend on being able to do this. PR: 48291
Diffstat (limited to 'sys/fs/smbfs/smbfs_smb.c')
-rw-r--r--sys/fs/smbfs/smbfs_smb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c
index 034fc77..3a21ad2 100644
--- a/sys/fs/smbfs/smbfs_smb.c
+++ b/sys/fs/smbfs/smbfs_smb.c
@@ -363,7 +363,8 @@ smb_smb_flush(struct smbnode *np, struct smb_cred *scred)
struct mbchain *mbp;
int error;
- if (np->n_opencount <= 0 || !SMBTOV(np) || SMBTOV(np)->v_type != VREG)
+ if ((np->n_flag & NOPEN) != 0 || !SMBTOV(np) ||
+ SMBTOV(np)->v_type != VREG)
return 0; /* not a regular open file */
error = smb_rq_init(rqp, SSTOCP(ssp), SMB_COM_FLUSH, scred);
if (error)
OpenPOWER on IntegriCloud