@@ -195,8 +195,7 @@ int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat)
195195
196196static int ovl_copy_up_locked (struct dentry * workdir , struct dentry * upperdir ,
197197 struct dentry * dentry , struct path * lowerpath ,
198- struct kstat * stat , struct iattr * attr ,
199- const char * link )
198+ struct kstat * stat , const char * link )
200199{
201200 struct inode * wdir = workdir -> d_inode ;
202201 struct inode * udir = upperdir -> d_inode ;
@@ -240,8 +239,6 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
240239
241240 mutex_lock (& newdentry -> d_inode -> i_mutex );
242241 err = ovl_set_attr (newdentry , stat );
243- if (!err && attr )
244- err = notify_change (newdentry , attr , NULL );
245242 mutex_unlock (& newdentry -> d_inode -> i_mutex );
246243 if (err )
247244 goto out_cleanup ;
@@ -286,8 +283,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
286283 * that point the file will have already been copied up anyway.
287284 */
288285int ovl_copy_up_one (struct dentry * parent , struct dentry * dentry ,
289- struct path * lowerpath , struct kstat * stat ,
290- struct iattr * attr )
286+ struct path * lowerpath , struct kstat * stat )
291287{
292288 struct dentry * workdir = ovl_workdir (dentry );
293289 int err ;
@@ -345,26 +341,19 @@ int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry,
345341 }
346342 upperdentry = ovl_dentry_upper (dentry );
347343 if (upperdentry ) {
348- unlock_rename ( workdir , upperdir );
344+ /* Raced with another copy-up? Nothing to do, then... */
349345 err = 0 ;
350- /* Raced with another copy-up? Do the setattr here */
351- if (attr ) {
352- mutex_lock (& upperdentry -> d_inode -> i_mutex );
353- err = notify_change (upperdentry , attr , NULL );
354- mutex_unlock (& upperdentry -> d_inode -> i_mutex );
355- }
356- goto out_put_cred ;
346+ goto out_unlock ;
357347 }
358348
359349 err = ovl_copy_up_locked (workdir , upperdir , dentry , lowerpath ,
360- stat , attr , link );
350+ stat , link );
361351 if (!err ) {
362352 /* Restore timestamps on parent (best effort) */
363353 ovl_set_timestamps (upperdir , & pstat );
364354 }
365355out_unlock :
366356 unlock_rename (workdir , upperdir );
367- out_put_cred :
368357 revert_creds (old_cred );
369358 put_cred (override_cred );
370359
@@ -406,7 +395,7 @@ int ovl_copy_up(struct dentry *dentry)
406395 ovl_path_lower (next , & lowerpath );
407396 err = vfs_getattr (& lowerpath , & stat );
408397 if (!err )
409- err = ovl_copy_up_one (parent , next , & lowerpath , & stat , NULL );
398+ err = ovl_copy_up_one (parent , next , & lowerpath , & stat );
410399
411400 dput (parent );
412401 dput (next );
0 commit comments