NFS_RPC_SWAPFLAGS is only used for READ requests. It sets RPC_TASK_SWAPPER which gives some memory-allocation priority to requests. This is not needed for swap READ - though it is for writes where it is set via a different mechanism. RPC_TASK_ROOTCREDS causes the 'machine' credential to be used. This is not needed as the root credential is saved when the swap file is opened, and this is used for all IO. So NFS_RPC_SWAPFLAGS isn't needed, and as it is the only user of RPC_TASK_ROOTCREDS, that isn't needed either. Remove both.
Showing the changes to include (3 of 5 files). Show all
Unified · Split
| @@ -45,11 +45,6 @@ · 44 unmodified lines | |||
| 45 | */ | 45 | */ |
| 46 | #define NFS_MAX_TRANSPORTS 16 | 46 | #define NFS_MAX_TRANSPORTS 16 |
| 47 | 47 | ||
| 48 | /* | ||
| 49 | * These are the default flags for swap requests | ||
| 50 | */ | ||
| 51 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) | ||
| 52 | |||
| 53 | /* | 48 | /* |
| 54 | * Size of the NFS directory verifier | 49 | * Size of the NFS directory verifier |
| 55 | */ | 50 | */ |
| @@ -124,7 +124,6 @@ struct rpc_task_setup { · 123 unmodified lines | |||
| 124 | #define RPC_TASK_MOVEABLE 0x0004 /* nfs4.1+ rpc tasks */ | 124 | #define RPC_TASK_MOVEABLE 0x0004 /* nfs4.1+ rpc tasks */ |
| 125 | #define RPC_TASK_NULLCREDS 0x0010 /* Use AUTH_NULL credential */ | 125 | #define RPC_TASK_NULLCREDS 0x0010 /* Use AUTH_NULL credential */ |
| 126 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ | 126 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ |
| 127 | #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ | ||
| 128 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ | 127 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ |
| 129 | #define RPC_TASK_NO_ROUND_ROBIN 0x0100 /* send requests on "main" xprt */ | 128 | #define RPC_TASK_NO_ROUND_ROBIN 0x0100 /* send requests on "main" xprt */ |
| 130 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ | 129 | #define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ |
| @@ -311,7 +311,6 @@ TRACE_EVENT(rpc_request, · 310 unmodified lines | |||
| 311 | { RPC_TASK_MOVEABLE, "MOVEABLE" }, \ | 311 | { RPC_TASK_MOVEABLE, "MOVEABLE" }, \ |
| 312 | { RPC_TASK_NULLCREDS, "NULLCREDS" }, \ | 312 | { RPC_TASK_NULLCREDS, "NULLCREDS" }, \ |
| 313 | { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \ | 313 | { RPC_CALL_MAJORSEEN, "MAJORSEEN" }, \ |
| 314 | { RPC_TASK_ROOTCREDS, "ROOTCREDS" }, \ | ||
| 315 | { RPC_TASK_DYNAMIC, "DYNAMIC" }, \ | 314 | { RPC_TASK_DYNAMIC, "DYNAMIC" }, \ |
| 316 | { RPC_TASK_NO_ROUND_ROBIN, "NO_ROUND_ROBIN" }, \ | 315 | { RPC_TASK_NO_ROUND_ROBIN, "NO_ROUND_ROBIN" }, \ |
| 317 | { RPC_TASK_SOFT, "SOFT" }, \ | 316 | { RPC_TASK_SOFT, "SOFT" }, \ |