]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 23 Feb 2013 22:36:01 +0000 (17:36 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Feb 2013 07:46:11 +0000 (02:46 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/anon_inodes.c
fs/open.c
net/socket.c

index a14eb0c1cd8cf5c98b9c4894e1cfd20c675e04b8..47a65df8c87142e60600d69391f1d25c357b52a5 100644 (file)
@@ -164,9 +164,7 @@ struct file *anon_inode_getfile(const char *name,
                goto err_dput;
        file->f_mapping = anon_inode_inode->i_mapping;
 
-       file->f_pos = 0;
        file->f_flags = flags & (O_ACCMODE | O_NONBLOCK);
-       file->f_version = 0;
        file->private_data = priv;
 
        return file;
index 97a237f67b7215a0f5fe44847a930a282da6175f..62f907e3bc36aab08513270e6e9d636da96b9664 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -699,7 +699,6 @@ static int do_dentry_open(struct file *f,
        }
 
        f->f_mapping = inode->i_mapping;
-       f->f_pos = 0;
        file_sb_list_add(f, inode->i_sb);
 
        if (unlikely(f->f_mode & FMODE_PATH)) {
index f4a8c5a0b8d759296ebdc57b2f01b3bae8ebe388..b6ca6896dec66060e952e0e1eafea731c1055521 100644 (file)
@@ -379,7 +379,6 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
 
        sock->file = file;
        file->f_flags = O_RDWR | (flags & O_NONBLOCK);
-       file->f_pos = 0;
        file->private_data = sock;
        return file;
 }