mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
Fix 9p cache=mmap regression by revert
This reverts the problematic commit instead of trying to fix it in a rush -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE/IPbcYBuWt0zoYhOq06b7GqY5nAFAmj4a0UACgkQq06b7GqY 5nDCXw//bJR610gdU7YdYWdT/hJHv/QJEwYszWOkRHFEx8sHxKmjojx6c6KMsUbD NQ47qN+rXrt7mxdfnwuzLwxO0ANn33495jScKfSX7ihiWvx7CLQn8spX6gBRCph1 pVvD+LplCr5y1v2nScSFG6sndgoSClVo4sBWjgseOrDAaeZNCXMqFqcKqy6QFWM1 s227DoS/I5G8BSByVLDH5agt7wzwburHGVBU8FKKi5vrWinQndOe54CzX4qhUqUH bNYCVdJLZ9eQ7e4P6P29mMRczqm2IyPHvv85qOVye7fCGhXqq+1jWOkeRqYD0bI3 jZQnZmDcAkorBXdk4svPWOui9VlMket7U+XVlEjy2O3R3L/KcMuorznrd8KlOYt8 3TDOiJ3afYZTP5Akoeb+ZLIMWvH0c34GaU3qZ84Cv3b02vk6E/78Ly1Z9U7R+pdn oHaeDUvQeILFnRuo+SuZQQ8yF0ZGCOd+J103GWqgRZdHD7w2WspQuQgdKXuWJewO ZhNOawCtGXyaD1KfkdeSRlSTcHmkqBDAluzsPITQoKHHvmP1LgLgefxF0MdpGOLw E7MVWxawmGKVLPRtx0h6Q/wHOFA01Rh8RlJyy+Ewb2vAarFXsedBqQE2pUlbOalW bP9uAvJgYUUHpQoMiMP4eFKWiv1LjijYnxkGDwOs/oVh5u7wtLQ= =bIeR -----END PGP SIGNATURE----- Merge tag '9p-for-6.18-rc3-v2' of https://github.com/martinetd/linux Pull 9pfs fix from Dominique Martinet: "Fix 9p cache=mmap regression by revert This reverts the problematic commit instead of trying to fix it in a rush" * tag '9p-for-6.18-rc3-v2' of https://github.com/martinetd/linux: Revert "fs/9p: Refresh metadata in d_revalidate for uncached mode too"
This commit is contained in:
commit
9ea7460217
|
|
@ -66,7 +66,6 @@ static int __v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
|||
struct p9_fid *fid;
|
||||
struct inode *inode;
|
||||
struct v9fs_inode *v9inode;
|
||||
unsigned int cached;
|
||||
|
||||
if (flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
|
@ -76,11 +75,7 @@ static int __v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
|||
goto out_valid;
|
||||
|
||||
v9inode = V9FS_I(inode);
|
||||
struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
|
||||
|
||||
cached = v9ses->cache & (CACHE_META | CACHE_LOOSE);
|
||||
|
||||
if (!cached || v9inode->cache_validity & V9FS_INO_INVALID_ATTR) {
|
||||
if (v9inode->cache_validity & V9FS_INO_INVALID_ATTR) {
|
||||
int retval;
|
||||
struct v9fs_session_info *v9ses;
|
||||
|
||||
|
|
@ -114,6 +109,7 @@ static int __v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
|
|||
p9_debug(P9_DEBUG_VFS,
|
||||
"refresh inode: dentry = %pd (%p), got error %pe\n",
|
||||
dentry, dentry, ERR_PTR(retval));
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
|
@ -150,8 +146,6 @@ const struct dentry_operations v9fs_cached_dentry_operations = {
|
|||
};
|
||||
|
||||
const struct dentry_operations v9fs_dentry_operations = {
|
||||
.d_revalidate = v9fs_lookup_revalidate,
|
||||
.d_weak_revalidate = __v9fs_lookup_revalidate,
|
||||
.d_release = v9fs_dentry_release,
|
||||
.d_unalias_trylock = v9fs_dentry_unalias_trylock,
|
||||
.d_unalias_unlock = v9fs_dentry_unalias_unlock,
|
||||
|
|
|
|||
|
|
@ -1339,14 +1339,8 @@ int v9fs_refresh_inode(struct p9_fid *fid, struct inode *inode)
|
|||
* Don't update inode if the file type is different
|
||||
*/
|
||||
umode = p9mode2unixmode(v9ses, st, &rdev);
|
||||
if (inode_wrong_type(inode, umode)) {
|
||||
/*
|
||||
* Do this as a way of letting the caller know the inode should not
|
||||
* be reused
|
||||
*/
|
||||
v9fs_invalidate_inode_attr(inode);
|
||||
if (inode_wrong_type(inode, umode))
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't want to refresh inode->i_size,
|
||||
|
|
|
|||
|
|
@ -897,14 +897,8 @@ int v9fs_refresh_inode_dotl(struct p9_fid *fid, struct inode *inode)
|
|||
/*
|
||||
* Don't update inode if the file type is different
|
||||
*/
|
||||
if (inode_wrong_type(inode, st->st_mode)) {
|
||||
/*
|
||||
* Do this as a way of letting the caller know the inode should not
|
||||
* be reused
|
||||
*/
|
||||
v9fs_invalidate_inode_attr(inode);
|
||||
if (inode_wrong_type(inode, st->st_mode))
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't want to refresh inode->i_size,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user