Notable regression fixes:
- Enable SETATTR(time_create) to fix regression with Mac OS clients - Fix a lockd crasher and broken NLM UNLCK behavior -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmLQSzcACgkQM2qzM29m f5d5Sg/9Hln5dSnIpgJKyhIy+ic5QB29VL9RWZ7JtVCUsWsaVObkwobmne7UWAms X9eehGG2gYTsLcXH9oIGeLRrjbWGYbdg3B6tGMFeQZgI6NeSvBS9AeDzyG+rRTyL 2czvODorTSfYokbsHNE3kWh0Tohkvd/4wV1y5GUcLYKUj6ZO21xsSbEj7381nriJ 9nkudqgJTfCINxqRiIRBT+iCNfjvAc8EhfxP+ThcmcjJH9WeWi9kR0ZF050jloO/ JH2RZRNN+crNdg77HlXyc/jcr2G/wv/IR5G40LqeLgrJbvPAKRGAltzeyErWY7eB 6jsWf7/vil6+PfuUaPskt9h60hGe3DeBzraK4gFcEKci6YSqbE7h1GrUtM6/2E0a 5HM2mYAZfYBZyT2HitZCoFXOvGssM6543QXW2noMo/6eAWFPfdzjlN55FLNssqkq 8fPMLoiBElOvVLCYvi91CpnqSsmR4WW44dwY/d+H7DG4QnCurPGMH2OFHX3epk5J kJzhT63GuemgwrxZICT8KQ6aVWHreHRO2LTKv9yjhEohsqkCf3eV/xlWKzcRFXLj HQIBfQf1UIOonxOkdGUG1w0Es/Wz7btQehc/CwaMi74VUjZUp5qSMjCUWkckyALc 3k1ojcODEyR/5rOepQF4kRzOzSbm7TETwhF7YG0TRPugIGri/sQ= =T8gK -----END PGP SIGNATURE----- Merge tag 'nfsd-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: "Notable regression fixes: - Enable SETATTR(time_create) to fix regression with Mac OS clients - Fix a lockd crasher and broken NLM UNLCK behavior" * tag 'nfsd-5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: lockd: fix nlm_close_files lockd: set fl_owner when unlocking files NFSD: Decode NFSv4 birth time attribute
This commit is contained in:
Коммит
a24a6c05ff
|
@ -176,7 +176,7 @@ nlm_delete_file(struct nlm_file *file)
|
|||
}
|
||||
}
|
||||
|
||||
static int nlm_unlock_files(struct nlm_file *file)
|
||||
static int nlm_unlock_files(struct nlm_file *file, fl_owner_t owner)
|
||||
{
|
||||
struct file_lock lock;
|
||||
|
||||
|
@ -184,6 +184,7 @@ static int nlm_unlock_files(struct nlm_file *file)
|
|||
lock.fl_type = F_UNLCK;
|
||||
lock.fl_start = 0;
|
||||
lock.fl_end = OFFSET_MAX;
|
||||
lock.fl_owner = owner;
|
||||
if (file->f_file[O_RDONLY] &&
|
||||
vfs_lock_file(file->f_file[O_RDONLY], F_SETLK, &lock, NULL))
|
||||
goto out_err;
|
||||
|
@ -225,7 +226,7 @@ again:
|
|||
if (match(lockhost, host)) {
|
||||
|
||||
spin_unlock(&flctx->flc_lock);
|
||||
if (nlm_unlock_files(file))
|
||||
if (nlm_unlock_files(file, fl->fl_owner))
|
||||
return 1;
|
||||
goto again;
|
||||
}
|
||||
|
@ -282,11 +283,10 @@ nlm_file_inuse(struct nlm_file *file)
|
|||
|
||||
static void nlm_close_files(struct nlm_file *file)
|
||||
{
|
||||
struct file *f;
|
||||
|
||||
for (f = file->f_file[0]; f <= file->f_file[1]; f++)
|
||||
if (f)
|
||||
nlmsvc_ops->fclose(f);
|
||||
if (file->f_file[O_RDONLY])
|
||||
nlmsvc_ops->fclose(file->f_file[O_RDONLY]);
|
||||
if (file->f_file[O_WRONLY])
|
||||
nlmsvc_ops->fclose(file->f_file[O_WRONLY]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -470,6 +470,15 @@ nfsd4_decode_fattr4(struct nfsd4_compoundargs *argp, u32 *bmval, u32 bmlen,
|
|||
return nfserr_bad_xdr;
|
||||
}
|
||||
}
|
||||
if (bmval[1] & FATTR4_WORD1_TIME_CREATE) {
|
||||
struct timespec64 ts;
|
||||
|
||||
/* No Linux filesystem supports setting this attribute. */
|
||||
bmval[1] &= ~FATTR4_WORD1_TIME_CREATE;
|
||||
status = nfsd4_decode_nfstime4(argp, &ts);
|
||||
if (status)
|
||||
return status;
|
||||
}
|
||||
if (bmval[1] & FATTR4_WORD1_TIME_MODIFY_SET) {
|
||||
u32 set_it;
|
||||
|
||||
|
|
|
@ -465,7 +465,8 @@ static inline bool nfsd_attrs_supported(u32 minorversion, const u32 *bmval)
|
|||
(FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL)
|
||||
#define NFSD_WRITEABLE_ATTRS_WORD1 \
|
||||
(FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \
|
||||
| FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET)
|
||||
| FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_CREATE \
|
||||
| FATTR4_WORD1_TIME_MODIFY_SET)
|
||||
#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
|
||||
#define MAYBE_FATTR4_WORD2_SECURITY_LABEL \
|
||||
FATTR4_WORD2_SECURITY_LABEL
|
||||
|
|
Загрузка…
Ссылка в новой задаче