Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag '9p-fixes-for-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

Pull fs/9p fixes from Eric Van Hensbergen:
"This contains a reversion of one of the original 6.9 patches which
seems to have been the cause of most of the instability. It also
incorporates several fixes to legacy support and cache fixes.

There are few additional changes to improve stability, but I want
another week of testing before sending them upstream"

* tag '9p-fixes-for-6.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
fs/9p: drop inodes immediately on non-.L too
fs/9p: Revert "fs/9p: fix dups even in uncached mode"
fs/9p: remove erroneous nlink init from legacy stat2inode
9p: explicitly deny setlease attempts
fs/9p: fix the cache always being enabled on files with qid flags
fs/9p: translate O_TRUNC into OTRUNC
fs/9p: only translate RWX permissions for plain 9P2000

+23 -6
-3
fs/9p/fid.h
··· 49 49 static inline void v9fs_fid_add_modes(struct p9_fid *fid, unsigned int s_flags, 50 50 unsigned int s_cache, unsigned int f_flags) 51 51 { 52 - if (fid->qid.type != P9_QTFILE) 53 - return; 54 - 55 52 if ((!s_cache) || 56 53 ((fid->qid.version == 0) && !(s_flags & V9FS_IGNORE_QV)) || 57 54 (s_flags & V9FS_DIRECT_IO) || (f_flags & O_DIRECT)) {
+2
fs/9p/vfs_file.c
··· 520 520 .splice_read = v9fs_file_splice_read, 521 521 .splice_write = iter_file_splice_write, 522 522 .fsync = v9fs_file_fsync, 523 + .setlease = simple_nosetlease, 523 524 }; 524 525 525 526 const struct file_operations v9fs_file_operations_dotl = { ··· 535 534 .splice_read = v9fs_file_splice_read, 536 535 .splice_write = iter_file_splice_write, 537 536 .fsync = v9fs_file_fsync_dotl, 537 + .setlease = simple_nosetlease, 538 538 };
+4 -3
fs/9p/vfs_inode.c
··· 83 83 int res; 84 84 int mode = stat->mode; 85 85 86 - res = mode & S_IALLUGO; 86 + res = mode & 0777; /* S_IRWXUGO */ 87 87 if (v9fs_proto_dotu(v9ses)) { 88 88 if ((mode & P9_DMSETUID) == P9_DMSETUID) 89 89 res |= S_ISUID; ··· 177 177 ret = P9_ORDWR; 178 178 break; 179 179 } 180 + 181 + if (uflags & O_TRUNC) 182 + ret |= P9_OTRUNC; 180 183 181 184 if (extended) { 182 185 if (uflags & O_EXCL) ··· 1063 1060 umode_t mode; 1064 1061 struct v9fs_session_info *v9ses = sb->s_fs_info; 1065 1062 struct v9fs_inode *v9inode = V9FS_I(inode); 1066 - 1067 - set_nlink(inode, 1); 1068 1063 1069 1064 inode_set_atime(inode, stat->atime, 0); 1070 1065 inode_set_mtime(inode, stat->mtime, 0);
+17
fs/9p/vfs_super.c
··· 244 244 return res; 245 245 } 246 246 247 + static int v9fs_drop_inode(struct inode *inode) 248 + { 249 + struct v9fs_session_info *v9ses; 250 + 251 + v9ses = v9fs_inode2v9ses(inode); 252 + if (v9ses->cache & (CACHE_META|CACHE_LOOSE)) 253 + return generic_drop_inode(inode); 254 + /* 255 + * in case of non cached mode always drop the 256 + * inode because we want the inode attribute 257 + * to always match that on the server. 258 + */ 259 + return 1; 260 + } 261 + 247 262 static int v9fs_write_inode(struct inode *inode, 248 263 struct writeback_control *wbc) 249 264 { ··· 283 268 .alloc_inode = v9fs_alloc_inode, 284 269 .free_inode = v9fs_free_inode, 285 270 .statfs = simple_statfs, 271 + .drop_inode = v9fs_drop_inode, 286 272 .evict_inode = v9fs_evict_inode, 287 273 .show_options = v9fs_show_options, 288 274 .umount_begin = v9fs_umount_begin, ··· 294 278 .alloc_inode = v9fs_alloc_inode, 295 279 .free_inode = v9fs_free_inode, 296 280 .statfs = v9fs_statfs, 281 + .drop_inode = v9fs_drop_inode, 297 282 .evict_inode = v9fs_evict_inode, 298 283 .show_options = v9fs_show_options, 299 284 .umount_begin = v9fs_umount_begin,