summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-30 20:53:35 (GMT)
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-30 20:53:35 (GMT)
commit64894cf843278c7b2653a6fac2cd1a697ff930dc (patch)
tree10e03b6cbbeb9065f54321836d0c9c0d5080721f /drivers/video
parentf8310c59201b183ebee2e3fe0c7242f5729be0af (diff)
downloadlinux-fsl-qoriq-64894cf843278c7b2653a6fac2cd1a697ff930dc.tar.xz
simplify lookup_open()/atomic_open() - do the temporary mnt_want_write() early
The write ref to vfsmount taken in lookup_open()/atomic_open() is going to be dropped; we take the one to stay in dentry_open(). Just grab the temporary in caller if it looks like we are going to need it (create/truncate/writable open) and pass (by value) "has it succeeded" flag. Instead of doing mnt_want_write() inside, check that flag and treat "false" as "mnt_want_write() has just failed". mnt_want_write() is cheap and the things get considerably simpler and more robust that way - we get it and drop it in the same function, to start with, rather than passing a "has something in the guts of really scary functions taken it" back to caller. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/video')
0 files changed, 0 insertions, 0 deletions