NFSD: Define a proc_layoutcommit for the FlexFiles layout type
Subsystems (2)
Chuck Lever
maintainerPATCH 1/1 NFSD: Define a proc_layoutcommit for the FlexFiles layout type
From: Chuck Lever <[email protected]>
Avoid a crash if a pNFS client should happen to send a LAYOUTCOMMIT operation on a FlexFiles layout.
Reported-by Robert Morris <[email protected]>
Cc Thomas Haynes <[email protected]>
Fixes 9b9960a0ca47 ("nfsd: Add a super simple flex file server")
Signed-off-by Chuck Lever <[email protected]>
--- fs/nfsd/flexfilelayout.c | 8 ++++++++ 1 file changed, 8 insertions(+)
fs/nfsd/flexfilelayout.c +8 -0
@@ -125,6 +125,13 @@ nfsd4_ff_proc_getdeviceinfo(struct super_block *sb, struct svc_rqst *rqstp,return 0 ; } +static __be32 +nfsd4_ff_proc_layoutcommit (struct inode *inode,struct svc_rqst *rqstp, +struct nfsd4_layoutcommit *lcp) +{ +return nfs_ok; +} +const struct nfsd4_layout_ops ff_layout_ops = { .notify_types =NOTIFY_DEVICEID4_DELETE |NOTIFY_DEVICEID4_CHANGE ,
@@ -133,4 +140,5 @@ const struct nfsd4_layout_ops ff_layout_ops = { .encode_getdeviceinfo = nfsd4_ff_encode_getdeviceinfo, .proc_layoutget = nfsd4_ff_proc_layoutget, .encode_layoutget = nfsd4_ff_encode_layoutget, + .proc_layoutcommit = nfsd4_ff_proc_layoutcommit, };
Signature · 1 line
2.50.0