]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commit9167f501c6b53492eb2566dd618ce7f55f2856d5
tree41a39a802a0c6c848bfc7d9b322dbf83ab63fcdb
parenta3fa73bd0eea74c58315114c9fc3e913f6c26d61
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