diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-10-13 21:12:59 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-17 23:33:57 +0200 |
commit | d29b20cd589128a599e5045d4effc2d7dbc388f5 (patch) | |
tree | 48794b614b23f4159f2edeef484b1ff9c93ffbd7 /fs/nfsd/state.h | |
parent | nfsd4: simplify process_open1 logic (diff) | |
download | linux-d29b20cd589128a599e5045d4effc2d7dbc388f5.tar.xz linux-d29b20cd589128a599e5045d4effc2d7dbc388f5.zip |
nfsd4: clean up open owners on OPEN failure
If process_open1() creates a new open owner, but the open later fails,
the current code will leave the open owner around. It won't be on the
close_lru list, and the client isn't expected to send a CLOSE, so it
will hang around as long as the client does.
Similarly, if process_open1() removes an existing open owner from the
close lru, anticipating that an open owner that previously had no
associated stateid's now will, but the open subsequently fails, then
we'll again be left with the same leak.
Fix both problems.
Reported-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 87eecfd9b968..eab9dae23c06 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -359,6 +359,7 @@ struct nfs4_openowner { time_t oo_time; /* time of placement on so_close_lru */ #define NFS4_OO_CONFIRMED 1 #define NFS4_OO_PURGE_CLOSE 2 +#define NFS4_OO_NEW 4 unsigned char oo_flags; }; |