diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-11 16:54:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-11 16:54:09 -0400 |
commit | 216e4a1def29a0d04182875034efb764eb37b8ff (patch) | |
tree | f23fbe5c6ebfb9112d253511de14a93fce71dfb5 /fs | |
parent | e0d0e045b862da06f2a694696797b2c46ae8bc4f (diff) | |
parent | 8a9d6e964d318533ba3d2901ce153ba317c99a89 (diff) |
Merge tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/linux-nfs
Pull NFS client fixes from Anna Schumaker:
"A few more NFS client bugfixes from me for rc5.
Dros has a stable fix for flexfiles to prevent leaking the
nfs4_ff_ds_version arrays when freeing a layout, Trond fixed a
potential recovery loop situation with the TEST_STATEID operation, and
Christoph fixed up the pNFS blocklayout Kconfig options to prevent
unsafe use with kernels that don't have large block device support.
Summary:
Stable fix:
- fix leaking nfs4_ff_ds_version array
Other fixes:
- improve TEST_STATEID OLD_STATEID handling to prevent recovery loop
- require 64-bit sector_t for pNFS blocklayout to prevent 32-bit
compile errors"
* tag 'nfs-for-4.13-5' of git://git.linux-nfs.org/projects/anna/linux-nfs:
pnfs/blocklayout: require 64-bit sector_t
NFSv4: Ignore NFS4ERR_OLD_STATEID in nfs41_check_open_stateid()
nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/Kconfig | 1 | ||||
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 1 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 3 |
3 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig index 69d02cf8cf37..5f93cfacb3d1 100644 --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig | |||
@@ -121,6 +121,7 @@ config PNFS_FILE_LAYOUT | |||
121 | config PNFS_BLOCK | 121 | config PNFS_BLOCK |
122 | tristate | 122 | tristate |
123 | depends on NFS_V4_1 && BLK_DEV_DM | 123 | depends on NFS_V4_1 && BLK_DEV_DM |
124 | depends on 64BIT || LBDAF | ||
124 | default NFS_V4 | 125 | default NFS_V4 |
125 | 126 | ||
126 | config PNFS_FLEXFILE_LAYOUT | 127 | config PNFS_FLEXFILE_LAYOUT |
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 6df7a0cf5660..f32c58bbe556 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c | |||
@@ -32,6 +32,7 @@ void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds) | |||
32 | { | 32 | { |
33 | nfs4_print_deviceid(&mirror_ds->id_node.deviceid); | 33 | nfs4_print_deviceid(&mirror_ds->id_node.deviceid); |
34 | nfs4_pnfs_ds_put(mirror_ds->ds); | 34 | nfs4_pnfs_ds_put(mirror_ds->ds); |
35 | kfree(mirror_ds->ds_versions); | ||
35 | kfree_rcu(mirror_ds, id_node.rcu); | 36 | kfree_rcu(mirror_ds, id_node.rcu); |
36 | } | 37 | } |
37 | 38 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index ffd2e712595d..d90132642340 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2553,9 +2553,8 @@ static int nfs41_check_open_stateid(struct nfs4_state *state) | |||
2553 | clear_bit(NFS_O_RDWR_STATE, &state->flags); | 2553 | clear_bit(NFS_O_RDWR_STATE, &state->flags); |
2554 | clear_bit(NFS_OPEN_STATE, &state->flags); | 2554 | clear_bit(NFS_OPEN_STATE, &state->flags); |
2555 | stateid->type = NFS4_INVALID_STATEID_TYPE; | 2555 | stateid->type = NFS4_INVALID_STATEID_TYPE; |
2556 | } | ||
2557 | if (status != NFS_OK) | ||
2558 | return status; | 2556 | return status; |
2557 | } | ||
2559 | if (nfs_open_stateid_recover_openmode(state)) | 2558 | if (nfs_open_stateid_recover_openmode(state)) |
2560 | return -NFS4ERR_OPENMODE; | 2559 | return -NFS4ERR_OPENMODE; |
2561 | return NFS_OK; | 2560 | return NFS_OK; |