diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-07-24 00:29:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:27 -0400 |
commit | 7d9dbca34240ebb6ff88d8a29c6c7bffd098f0c1 (patch) | |
tree | 7e3226a4d885f5e4444fbe01a08c51b0b33b2cc7 /virt | |
parent | c019bbc612f6633ede7ed67725cbf68de45ae8a4 (diff) |
flag parameters: anon_inode_getfd extension
This patch just extends the anon_inode_getfd interface to take an additional
parameter with a flag value. The flag value is passed on to
get_unused_fd_flags in anticipation for a use with the O_CLOEXEC flag.
No actual semantic changes here, the changed callers all pass 0 for now.
[akpm@linux-foundation.org: KVM fix]
Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 904d7b7bd780..a845890b6800 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -902,7 +902,7 @@ static const struct file_operations kvm_vcpu_fops = { | |||
902 | */ | 902 | */ |
903 | static int create_vcpu_fd(struct kvm_vcpu *vcpu) | 903 | static int create_vcpu_fd(struct kvm_vcpu *vcpu) |
904 | { | 904 | { |
905 | int fd = anon_inode_getfd("kvm-vcpu", &kvm_vcpu_fops, vcpu); | 905 | int fd = anon_inode_getfd("kvm-vcpu", &kvm_vcpu_fops, vcpu, 0); |
906 | if (fd < 0) | 906 | if (fd < 0) |
907 | kvm_put_kvm(vcpu->kvm); | 907 | kvm_put_kvm(vcpu->kvm); |
908 | return fd; | 908 | return fd; |
@@ -1261,7 +1261,7 @@ static int kvm_dev_ioctl_create_vm(void) | |||
1261 | kvm = kvm_create_vm(); | 1261 | kvm = kvm_create_vm(); |
1262 | if (IS_ERR(kvm)) | 1262 | if (IS_ERR(kvm)) |
1263 | return PTR_ERR(kvm); | 1263 | return PTR_ERR(kvm); |
1264 | fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm); | 1264 | fd = anon_inode_getfd("kvm-vm", &kvm_vm_fops, kvm, 0); |
1265 | if (fd < 0) | 1265 | if (fd < 0) |
1266 | kvm_put_kvm(kvm); | 1266 | kvm_put_kvm(kvm); |
1267 | 1267 | ||