Re: [ 02/42] TTY: do not update atime/mtime on read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 29, 2013 at 6:37 PM, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Ah, it's using inotify on the /dev/ptmx device.  Jiri, your change
> really doesn't affect that at all :(

Hmm. Maybe something like the appended? Together with making the time
modification be 10 seconds to make Simon happy (that's what Jiri
originally did, it was me who said "why not make it a natural human
timeframe"). In fact, maybe we should just make it a power-of-two (8?
4?) and avoid the nasty division..

Patch is whitespace-damaged and totally untested! Caveat applicator.

              Linus

--- snip snip ---

   drivers/tty/pty.c | 3 +++
   1 file changed, 3 insertions(+)

  diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
  index a62798fcc014..59bfaecc4e14 100644
  --- a/drivers/tty/pty.c
  +++ b/drivers/tty/pty.c
  @@ -681,6 +681,9 @@ static int ptmx_open(struct inode *inode, struct
file *filp)

    nonseekable_open(inode, filp);

  + /* We refuse fsnotify events on ptmx, since it's a shared resource */
  + filp->f_mode |= FMODE_NONOTIFY;
  +
    retval = tty_alloc_file(filp);
    if (retval)
    return retval;
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]