It seems that what you are attempting is quite similar to what is implemented in the Arduino. See e.g. Arduino Uno's schematics. It requires a few external component (a MOSFET to serve as a switch, a diode, etc). to be implemented. I'm not familiar enough with the Raspberry Pi, so I dont know if this scheme could be implemented without modifying the board.
You have received a large amount of useful input related to the question that you asked and it will be of assistance to others who read these answers in future.
However, you have been wasting people's time and confusing your self because you stated what you thought you needed to do to fix your problem instead of telling your people what your problem is. While there is some overlap the answers that have been given mainly relate to things that you are not trying to do. While they do somewhat address what you are trying to do, the diagram that you provided would make almost no sense in most contexts and is NOT doing what it appears to be doing.
Lesson: "Tell us what you actually are trying to do and we will tell you the best way to do it".
Real question: See Maxim DS1822 Data Sheet -
PAGE 5 - POWERING THE DS1822 and
page 6 SUPPLYING THE PARASITE-POWERED DS1822 DURING TEMPERATURE
In the related diagram below Vpu is a "weak pullup" and the FET is a "strong pullup".
When the Vdd pin is grounded, power supply energy may be provided via the DQ line and is stored in an internal capacitor Cpp (C parasitic power). During most portions of operation the "parasitic" feed provides enough current Ipp at an acceptable voltage to power the IC. During some operation Ipp is inadequate and the iC must either be powered via Vdd or via a higher current source (see data sheet page 5). During these high current operations the FET is turned on to provide extra supply current. This low resistance power feed clamps the bus high and presents it being used for signalling by other ICs on the bus, so the 'strong pullup' is enabled only for as long a period as required.
SO:
You do need a FET for pullup, you do need a high side FET, this need is most simply met with a P channel FET - all as advised by others.
As Vmicrocontroller (Vmcu) is >= V1_wire_bus, the FET is not being used as a level converter but as a high side power supply switch.
Choosing a MOSFET:
Connecting a suitable P Channel MOSFET as shown in the diagram will fill the need.
Many FETs will do the job.
Rdson / On resistance: MOSFET must have low enough on resistance = Rdson for the task.
A MOSFET that dropped 0.1V at 2 mA would probably suffice
Rdson = Vdrop / Iload =
= 0.1v/2 mA = 50 Ohms.
You'd have immense difficulty buying a P Channel FET with Rds = 50 Ohms = normally available ones are typically 50 to 5000 times BETTER (lower Rdson) ie 1 Ohm down to say 10 milliOhms.ie ANY P Channel MOSFET that meets other specs will have an OK Rdson
Gate operating voltage = Vth or Vgsth:
Vth or Vgsth should be << Vcpu.
ie the μP (microprocessor) should easily drive the MOSFET.
A 3.3V μP will JUST operate a MOSFET where Vth = 3V.
Operation will be better at Vgsth = 2.5V
and better again at 2V. Lower again does not hurt.
Vds_max > say 10V is OK - 20V or 30V better. > 30V OK.
Ids_max is so low as to be met by anything.
The horrible BSS184 - datasheet here is 20 cents in 1's at Digikey and does the job well enough. Digikey and others have many more that will do a better job - but not needed here.
Best Answer
The short answer is no. The way you've drawn this circuit, if VUSB is present, VIN=VBAT, and if VUSB is not present, VIN=VBAT-Vbodydiode.
I'd say you need to do research into what a FET does. The best way to think about it is a unidirectional voltage-controlled switch. That is to say, current can always pass from Source to Drain through the body diode, and if there is enough voltage difference between the Gate and the Source, then current can pass either direction through the Drain and Source.
The way many systems accomplish what you're trying to do is to put a diode on each input rail, pointing toward your device. With this, power is drawn from whichever rail is higher (the channel of other diode will not be sufficiently enhanced). The only issue with this is that it will drop your voltage rail by 0.7V or so (depending on diode selection) and if you are drawing any appreciable current, you'll be heating that diode a lot (possibly causing a failure). I don't know your application, so I can't tell you if this solution would be appropriate or not.
Edit: While doing something completely unrelated, I happened across this schematic: http://www.synthrotek.com/wp-content/uploads/2014/08/DIRT_Schematic_2.2.pdf The two 1N418's in the bottom left corner are doing exactly what you're talking about. The 9V battery is always lower than the 12V coming from the EURO connector (note that this voltage is external knowledge, I am not able to tell that from this schematic alone), thus if the battery is the only power source present, it is used, but if the EURO power is there, then that will be used. Also note that the expected power dissipation in this device is quite low.