[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130723095928.GA3278@gmail.com>
Date: Tue, 23 Jul 2013 17:59:28 +0800
From: Zheng Liu <gnehzuil.liu@...il.com>
To: jon ernst <jonernst07@...il.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: fix a bug when we try to open a file with
O_TMPFILE flag
On Tue, Jul 23, 2013 at 07:51:41AM +0000, jon ernst wrote:
> Hi Zheng,
>
> I updated my kernel code to this commit, built kernel and loaded this kernel.
> I checked "uname -r", it is 3.11.0-rc1+ But when I run your test code,
> I always got "O_TMPFILE" undeclared.
> Could you please help, what could be wrong? (I included fcntl.h)
Ah, actually I used the following program to hit the bug. Just for your
information. Please let me know if you have any question.
Regards,
- Zheng
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#define __O_TMPFILE 020000000
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
int main(int argc, char *argv[])
{
int fd;
fd = open(argv[1], O_RDWR|O_TMPFILE);
if (fd < 0) {
perror("open ");
return -1;
}
close(fd);
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists