]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: initialize lease type in nfs4_open_delegation()
authorFelix Blyakher <felixb@sgi.com>
Tue, 26 Feb 2008 18:54:36 +0000 (10:54 -0800)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 23 Apr 2008 20:13:40 +0000 (16:13 -0400)
commit81fd41a5f2468f929f0588ff85fd29b4a5422955
tree41a39a802a0c6c848bfc7d9b322dbf83ab63fcdb
parent32e99be934ad5730b4e909631dfd65225fe90cc1
nfsd: initialize lease type in nfs4_open_delegation()

While lease is correctly checked by supplying the type argument to
vfs_setlease(), it's stored with fl_type uninitialized. This breaks the
logic when checking the type of the lease.  The fix is to initialize
fl_type.

The old code still happened to function correctly since F_RDLCK is zero,
and we only implement read delegations currently (nor write
delegations).  But that's no excuse for not fixing this.

Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c