Repository navigation
Commit be74fdd
NFS: Fix I/O request leakages
commit f57dcf4 upstream.
When we fail to add the request to the I/O queue, we currently leave it
to the caller to free the failed request. However since some of the
requests that fail are actually created by nfs_pageio_add_request()
itself, and are not passed back the caller, this leads to a leakage
issue, which can again cause page locks to leak.
This commit addresses the leakage by freeing the created requests on
error, using desc->pg_completion_ops->error_cleanup()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Fixes: a7d42dd ("nfs: add mirroring support to pgio layer")
Cc: stable@vger.kernel.org # v4.0: c18b96a: nfs: clean up rest of reqs
Cc: stable@vger.kernel.org # v4.0: d600ad1: NFS41: pop some layoutget
Cc: stable@vger.kernel.org # v4.0+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 4ea4f34 commit be74fdd
1 file changed
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
992 | 1003 | | |
993 | 1004 | | |
994 | 1005 | | |
| |||
1026 | 1037 | | |
1027 | 1038 | | |
1028 | 1039 | | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
| 1040 | + | |
| 1041 | + | |
1033 | 1042 | | |
1034 | 1043 | | |
1035 | 1044 | | |
| |||
1062 | 1071 | | |
1063 | 1072 | | |
1064 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
1065 | 1078 | | |
1066 | 1079 | | |
1067 | 1080 | | |
| |||
1169 | 1182 | | |
1170 | 1183 | | |
1171 | 1184 | | |
1172 | | - | |
| 1185 | + | |
1173 | 1186 | | |
1174 | 1187 | | |
1175 | 1188 | | |
1176 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
1177 | 1193 | | |
1178 | 1194 | | |
1179 | 1195 | | |
| |||
0 commit comments