]> git.karo-electronics.de Git - linux-beck.git/commitdiff
fuse: allow nanosecond granularity
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 11 Apr 2012 09:45:06 +0000 (11:45 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 11 Apr 2012 09:45:06 +0000 (11:45 +0200)
Derrik Pates reports that an utimensat with a NULL argument results in the
current time being sent from the kernel with 1 second granularity.

Reported-by: Derrik Pates <demon@now.ai>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/inode.c

index 64cf8d07393e4e55d2101039525fbaa0a1008e35..c9a0c972a4b2e5c8378e9b0e990c8c8b00ae524e 100644 (file)
@@ -947,6 +947,7 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
        sb->s_magic = FUSE_SUPER_MAGIC;
        sb->s_op = &fuse_super_operations;
        sb->s_maxbytes = MAX_LFS_FILESIZE;
+       sb->s_time_gran = 1;
        sb->s_export_op = &fuse_export_operations;
 
        file = fget(d.fd);