Re: [PATCH] cifs: update comments - [s/GlobalSMBSesLock/cifs_file_list_lock/g]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 18 Oct 2010 23:52:18 +0530
Suresh Jayaraman <sjayaraman@xxxxxxx> wrote:

> GlobalSMBSesLock is now cifs_file_list_lock. Update comments to reflect this.
> 
> OTOH, isn't there is a cleaner way instead of acquiring spin_lock and doing
> spin_unlock in succession in cifs_oplock_break to ensure we already grabbed
> the reference? Is this really needed?
> 
> Signed-off-by: Suresh Jayaraman <sjayaraman@xxxxxxx>

I wish there were -- it's certainly ugly.

We need to make sure we have references held for the oplock break
workqueue job. Typically, we'd take those references first and then
queue the work. If something goes wrong however and we can't queue that
job, then we'd have to ensure that we put those references.

There's a problem here though, is_valid_oplock_break is run in cifsd
thread. If we end up putting the references in this context, we can end
up tearing things down and doing blocking SMB calls. If cifsd does
that, it'll deadlock.

We could (in principle) add a completion variable or something for
this, but the lock/unlock works just as well for this purpose.

Comment fix looks fine:

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux