From: Linus Torvalds Date: Tue, 14 Aug 2018 04:28:25 +0000 (-0700) Subject: Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux... X-Git-Tag: v4.19~451 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4591343e3560d51fa37a24cd262192a7b889a6a3;p=platform%2Fkernel%2Flinux-rpi.git Merge branches 'work.misc' and 'work.dcache' of git://git./linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Misc cleanups from various folks all over the place I expected more fs/dcache.c cleanups this cycle, so that went into a separate branch. Said cleanups have missed the window, so in the hindsight it could've gone into work.misc instead. Decided not to cherry-pick, thus the 'work.dcache' branch" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: dcache: Use true and false for boolean values fold generic_readlink() into its only caller fs: shave 8 bytes off of struct inode fs: Add more kernel-doc to the produced documentation fs: Fix attr.c kernel-doc removed extra extern file_fdatawait_range * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill dentry_update_name_case() --- 4591343e3560d51fa37a24cd262192a7b889a6a3 diff --cc fs/namei.c index 278e494,bb6c6e4,734cef5..3cd3962 --- a/fs/namei.c +++ b/fs/namei.c @@@@ -3071,17 -3095,20 -3095,20 +3071,17 @@@@ static int atomic_open(struct nameidat /* * Look up and maybe create and open the last component. * -- * Must be called with i_mutex held on parent. - * - * Returns 0 if the file was successfully atomically created (if necessary) and - * opened. In this case the file will be returned attached to @file. - * - * Returns 1 if the file was not completely opened at this time, though lookups - * and creations will have been performed and the dentry returned in @path will - * be positive upon return if O_CREAT was specified. If O_CREAT wasn't - * specified then a negative dentry may be returned. ++ * Must be called with parent locked (exclusive in O_CREAT case). * - * Returns 0 if the file was successfully atomically created (if necessary) and - * opened. In this case the file will be returned attached to @file. - * An error code is returned otherwise. ++ * Returns 0 on success, that is, if ++ * the file was successfully atomically created (if necessary) and opened, or ++ * the file was not completely opened at this time, though lookups and ++ * creations were performed. ++ * These case are distinguished by presence of FMODE_OPENED on file->f_mode. ++ * In the latter case dentry returned in @path might be negative if O_CREAT ++ * hadn't been specified. * - * Returns 1 if the file was not completely opened at this time, though lookups - * and creations will have been performed and the dentry returned in @path will - * be positive upon return if O_CREAT was specified. If O_CREAT wasn't - * specified then a negative dentry may be returned. - * - * An error code is returned otherwise. - * -- * FILE_CREATE will be set in @*opened if the dentry was created and will be -- * cleared otherwise prior to returning. ++ * An error code is returned on failure. */ static int lookup_open(struct nameidata *nd, struct path *path, struct file *file,