Re: [PATCH] cifs: Reuse file lease key in compound operations

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

 



Shyam Prasad N <nspmangalore@xxxxxxxxx> writes:

> That's interesting. I'm assuming that the STATUS_INVALID_PARAMETER is
> due to the server not recognizing the lease id for the file bar.
> I'm not sure that this is a client bug.
> If the server supports hard links, then should it not be aware that
> foo and bar are the same files? AFAIK, file lease is associated with a
> file, and not the dentry.

The patch is doing

	+	//if there is an existing lease, reuse it
	+	if (dentry) {
	+		inode = d_inode(dentry);
	+		cinode = CIFS_I(inode);
	+		if (cinode->lease_granted) {
	+			oplock = SMB2_OPLOCK_LEVEL_LEASE;
	+			memcpy(fid.lease_key, cinode->lease_key, SMB2_LEASE_KEY_SIZE);
	+		}
	+	}

and @inode ends up being the same for foo and bar from reproducer.  So,
the client is trying to close bar file by using lease key from foo.  The
server then fails to match @cinode->lease_key for bar file.




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

  Powered by Linux