Message ID | 20220809021156.3086869-9-lsahlber@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/9] cifs: Move cached-dir functions into a separate file | expand |
Ronnie Sahlberg <lsahlber@redhat.com> writes: > Unlock it from the caller, which is also where the lock is taken. > > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> > --- > fs/cifs/cached_dir.c | 1 - > fs/cifs/smb2misc.c | 4 +++- > 2 files changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
FYI - I have merged this patch into patch1 to make it clearer On Thu, Aug 11, 2022 at 8:37 AM Paulo Alcantara <pc@cjr.nz> wrote: > > Ronnie Sahlberg <lsahlber@redhat.com> writes: > > > Unlock it from the caller, which is also where the lock is taken. > > > > Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> > > --- > > fs/cifs/cached_dir.c | 1 - > > fs/cifs/smb2misc.c | 4 +++- > > 2 files changed, 3 insertions(+), 2 deletions(-) > > Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
diff --git a/fs/cifs/cached_dir.c b/fs/cifs/cached_dir.c index 5f2d01833f1e..9d221f0bf976 100644 --- a/fs/cifs/cached_dir.c +++ b/fs/cifs/cached_dir.c @@ -389,7 +389,6 @@ int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]) smb2_cached_lease_break); queue_work(cifsiod_wq, &cfid->lease_break); - spin_unlock(&cifs_tcp_ses_lock); return true; } return false; diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index d3d9174ddd7c..2cc038aca5bc 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -640,8 +640,10 @@ smb2_is_valid_lease_break(char *buffer) } spin_unlock(&tcon->open_file_lock); - if (cached_dir_lease_break(tcon, rsp->LeaseKey)) + if (cached_dir_lease_break(tcon, rsp->LeaseKey)) { + spin_unlock(&cifs_tcp_ses_lock); return true; + } } } }
Unlock it from the caller, which is also where the lock is taken. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> --- fs/cifs/cached_dir.c | 1 - fs/cifs/smb2misc.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-)