[PATCH] F_SETLEASE only on regular files.
Volker Lendecke
Volker.Lendecke at SerNet.DE
Mon Jun 24 02:22:52 MDT 2013
On Sun, Jun 23, 2013 at 10:31:38AM +0200, Andreas Schneider wrote:
> On Sunday, June 23, 2013 09:38:27 you wrote:
> > On Sat, Jun 22, 2013 at 10:48:56AM +0200, Andreas Schneider wrote:
> > > Hello,
> > >
> > > we should set a lease with
> > >
> > > ret = fcntl(fd, F_SETLEASE, leasetype);
> > >
> > > in source3/smbd/oplock_linux.c only on regular files. Attached is a patch
> > > to do this. I'm not a VFS expert so the questions is if we shouldn't add
> > > errno (EINVAL) handling to functions which call SMB_VFS_LINUX_SETLEASE or
> > > SMB_VFS_NEXT_LINUX_SETLEASE. Maybe at least to not log an error.
> >
> > Question -- what made you look at this? Is there some real
> > error that you want to fix?
>
> I got a report cause people saw the error in the log file that setting the
> lease failed for a pipe.
>
> So if it is not a regular file we should not report and error but just
> silently skip it. So it is more about avoiding more of these kind of bug
> reports.
Ok. But I think it's right that we only check with the fstat
after this specific error actually happened.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list