locks: make ->lock release private data before returning in GETLK case
fs/nfs/nfs4proc.c static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock · line 3023
Quoted 10 lines · J. Bruce Fields
fs/nfs/nfs4proc.c +2
-0@@ -3019,6 +3019,8 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock status =0 ; } out: +if (request->fl_ops) + request->fl_ops->fl_release_private (request);
Don't we know which fl_release_private instace we'll call and could do a direct call instead?
Otherwise ok.
Quoted 14 lines · Christoph Hellwig
fs/nfs/nfs4proc.c static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock · line 3023
Quoted 10 lines · J. Bruce Fields
fs/nfs/nfs4proc.c +2
-0@@ -3019,6 +3019,8 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock status =0 ; } out: +if (request->fl_ops) + request->fl_ops->fl_release_private (request);Don't we know which
fl_release_privateinstace we'll call and could do a direct call instead?
Yeah. It's currently private to another file, but that could obviously be fixed. The fl_ops check is still required, though. I could go either way.
--b.