提交 3134cbec 编写于 作者: M Marc Eshel 提交者: Trond Myklebust

locks.c: add the fl_owner to nlm_compare_locks

Add the fl_owner to NLM compare locks. Since two different client can
present the same pid to the server it is not enough to distinguish locks
from different clients. The fl_owner field is a pointer to the struct
nlm_host which is unique for each client.
Signed-off-by: NMarc Eshel <eshel@almaden.ibm.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 81039f1f
......@@ -220,6 +220,7 @@ static __inline__ int
nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2)
{
return fl1->fl_pid == fl2->fl_pid
&& fl1->fl_owner == fl2->fl_owner
&& fl1->fl_start == fl2->fl_start
&& fl1->fl_end == fl2->fl_end
&&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册