diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 15:16:41 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 15:16:41 +0900 |
commit | 17eb9d62828c3688f41f31ac00d7fee6da9675bf (patch) | |
tree | 03da91192242b6467d4f2d9d0b26f11f4da55c0c /fs/anon_inodes.c | |
parent | 76e7461a21dfe13565b2a323b53c8cc963541126 (diff) | |
parent | f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5 (diff) |
Merge branches 'sh/g3-prep' and 'sh/stable-updates'
Diffstat (limited to 'fs/anon_inodes.c')
-rw-r--r-- | fs/anon_inodes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 2c994591f4d7a..9f0bf13291e53 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -121,13 +121,13 @@ struct file *anon_inode_getfile(const char *name, d_instantiate(path.dentry, anon_inode_inode); error = -ENFILE; - file = alloc_file(&path, FMODE_READ | FMODE_WRITE, fops); + file = alloc_file(&path, OPEN_FMODE(flags), fops); if (!file) goto err_dput; file->f_mapping = anon_inode_inode->i_mapping; file->f_pos = 0; - file->f_flags = O_RDWR | (flags & O_NONBLOCK); + file->f_flags = flags & (O_ACCMODE | O_NONBLOCK); file->f_version = 0; file->private_data = priv; |