nfsd4_locku / nfs4_free_lock_stateid question

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

 



Hi Jeff,

while reviewing some of your patches I've started wondering about
some v4 locking code.

In nfsd4_locku we're doing a call to find_any_file to grab a file
structure for the lock stateid, which nfs4_free_lock_stateid tries to
close. But what guarantees that we're actually getting the same file
descriptor back?

The nfs4_file is shared by and stateid that access a given inode,
so the first call to find_any_file might return the read/only file
structure because that's the only one available so far, while
by the time we unlock we might have a read/write and/or write-only file
available as well, which find_any_file will return.

It seems like the lock stateid needs a pointer to the actual file
locked, and keep a reference to it independent of the nfs4_file, or am I
missing something?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux