mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 13:32:07 -04:00
Merge tag 'nfs-for-5.17-3' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client bugfixes from Anna Schumaker: - Fix unnecessary changeattr revalidations - Fix resolving symlinks during directory lookups - Don't report writeback errors in nfs_getattr() * tag 'nfs-for-5.17-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Do not report writeback errors in nfs_getattr() NFS: LOOKUP_DIRECTORY is also ok with symlinks NFS: Remove an incorrect revalidation in nfs4_update_changeattr_locked()
This commit is contained in:
@@ -2010,14 +2010,14 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
|
||||
if (!res) {
|
||||
inode = d_inode(dentry);
|
||||
if ((lookup_flags & LOOKUP_DIRECTORY) && inode &&
|
||||
!S_ISDIR(inode->i_mode))
|
||||
!(S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)))
|
||||
res = ERR_PTR(-ENOTDIR);
|
||||
else if (inode && S_ISREG(inode->i_mode))
|
||||
res = ERR_PTR(-EOPENSTALE);
|
||||
} else if (!IS_ERR(res)) {
|
||||
inode = d_inode(res);
|
||||
if ((lookup_flags & LOOKUP_DIRECTORY) && inode &&
|
||||
!S_ISDIR(inode->i_mode)) {
|
||||
!(S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) {
|
||||
dput(res);
|
||||
res = ERR_PTR(-ENOTDIR);
|
||||
} else if (inode && S_ISREG(inode->i_mode)) {
|
||||
|
||||
@@ -853,12 +853,9 @@ int nfs_getattr(struct user_namespace *mnt_userns, const struct path *path,
|
||||
}
|
||||
|
||||
/* Flush out writes to the server in order to update c/mtime. */
|
||||
if ((request_mask & (STATX_CTIME|STATX_MTIME)) &&
|
||||
S_ISREG(inode->i_mode)) {
|
||||
err = filemap_write_and_wait(inode->i_mapping);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
if ((request_mask & (STATX_CTIME | STATX_MTIME)) &&
|
||||
S_ISREG(inode->i_mode))
|
||||
filemap_write_and_wait(inode->i_mapping);
|
||||
|
||||
/*
|
||||
* We may force a getattr if the user cares about atime.
|
||||
|
||||
@@ -1229,8 +1229,7 @@ nfs4_update_changeattr_locked(struct inode *inode,
|
||||
NFS_INO_INVALID_ACCESS | NFS_INO_INVALID_ACL |
|
||||
NFS_INO_INVALID_SIZE | NFS_INO_INVALID_OTHER |
|
||||
NFS_INO_INVALID_BLOCKS | NFS_INO_INVALID_NLINK |
|
||||
NFS_INO_INVALID_MODE | NFS_INO_INVALID_XATTR |
|
||||
NFS_INO_REVAL_PAGECACHE;
|
||||
NFS_INO_INVALID_MODE | NFS_INO_INVALID_XATTR;
|
||||
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
|
||||
}
|
||||
nfsi->attrtimeo_timestamp = jiffies;
|
||||
|
||||
Reference in New Issue
Block a user