FreeBSD Bugzilla – Attachment 241405 Details for
Bug 270749
[FUSEFS] File close() failures relating to attempted atime update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch to check whether we have permissions to update atime
patch-sys_fs_fuse_fuse__vnops.c (text/plain), 1006 bytes, created by
Jamie Landeg-Jones
on 2023-04-10 23:30:08 UTC
(
hide
)
Description:
patch to check whether we have permissions to update atime
Filename:
MIME Type:
Creator:
Jamie Landeg-Jones
Created:
2023-04-10 23:30:08 UTC
Size:
1006 bytes
patch
obsolete
># Patch to fix fuse close() error when trying to update "atime" on a file it has no permission to set. >--- sys/fs/fuse/fuse_vnops.c.orig 2023-04-10 19:19:21.346818000 +0100 >+++ sys/fs/fuse/fuse_vnops.c 2023-04-10 19:26:00.455394000 +0100 >@@ -615,7 +615,16 @@ > pid_t pid = td->td_proc->p_pid; > struct fuse_vnode_data *fvdat = VTOFUD(vp); > int err = 0; >+ struct mount *mp; >+ bool checkperm; >+ struct fuse_data *data; >+ int dataflags; > >+ mp = vnode_mount(vp); >+ data = fuse_get_mpdata(mp); >+ dataflags = data->dataflags; >+ checkperm = dataflags & FSESS_DEFAULT_PERMISSIONS; >+ > if (fuse_isdeadfs(vp)) > return 0; > if (vnode_isdir(vp)) >@@ -629,7 +638,12 @@ > > VATTR_NULL(&vap); > vap.va_atime = fvdat->cached_attrs.va_atime; >- err = fuse_internal_setattr(vp, &vap, td, NULL); >+ >+ if (checkperm) { >+ err = fuse_internal_setattr(vp, &vap, td, NULL); >+ } else { >+ err = 0; >+ } > } > /* TODO: close the file handle, if we're sure it's no longer used */ > if ((fvdat->flag & FN_SIZECHANGE) != 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 270749
: 241405