Re: Remove unnecessary code rom be_lo_put()

2024-04-25 Thread Yugo NAGATA
On Thu, 25 Apr 2024 10:26:41 +0200 Peter Eisentraut wrote: > On 24.04.24 15:25, Tom Lane wrote: > > Peter Eisentraut writes: > >> On 24.04.24 11:59, Yugo NAGATA wrote: > >>> I noticed that a permission check is performed in be_lo_put() > >>> just after returning inv_open(), but teh permission

Re: Remove unnecessary code rom be_lo_put()

2024-04-25 Thread Peter Eisentraut
On 24.04.24 15:25, Tom Lane wrote: Peter Eisentraut writes: On 24.04.24 11:59, Yugo NAGATA wrote: I noticed that a permission check is performed in be_lo_put() just after returning inv_open(), but teh permission should be already checked in inv_open(), so I think we can remove this part of

Re: Remove unnecessary code rom be_lo_put()

2024-04-25 Thread Peter Eisentraut
On 25.04.24 01:50, Michael Paquier wrote: On Wed, Apr 24, 2024 at 09:25:09AM -0400, Tom Lane wrote: I agree. Do you want to do the honors? Good catch. The same check happens when the object is opened. Note that you should be able to remove utils/acl.h at the top of be-fsstubs.c as this

Re: Remove unnecessary code rom be_lo_put()

2024-04-24 Thread Michael Paquier
On Wed, Apr 24, 2024 at 09:25:09AM -0400, Tom Lane wrote: > I agree. Do you want to do the honors? Good catch. The same check happens when the object is opened. Note that you should be able to remove utils/acl.h at the top of be-fsstubs.c as this would remove the last piece of code that does

Re: Remove unnecessary code rom be_lo_put()

2024-04-24 Thread Tom Lane
Peter Eisentraut writes: > On 24.04.24 11:59, Yugo NAGATA wrote: >> I noticed that a permission check is performed in be_lo_put() >> just after returning inv_open(), but teh permission should be >> already checked in inv_open(), so I think we can remove this >> part of codes. I attached a patch

Re: Remove unnecessary code rom be_lo_put()

2024-04-24 Thread Peter Eisentraut
On 24.04.24 11:59, Yugo NAGATA wrote: I noticed that a permission check is performed in be_lo_put() just after returning inv_open(), but teh permission should be already checked in inv_open(), so I think we can remove this part of codes. I attached a patch for this fix. Yes, I think you are

Remove unnecessary code rom be_lo_put()

2024-04-24 Thread Yugo NAGATA
Hi, I noticed that a permission check is performed in be_lo_put() just after returning inv_open(), but teh permission should be already checked in inv_open(), so I think we can remove this part of codes. I attached a patch for this fix. Regards, Yugo Nagata -- Yugo NAGATA diff --git