@@ -195,8 +195,7 @@ int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat)
195
195
196
196
static int ovl_copy_up_locked (struct dentry * workdir , struct dentry * upperdir ,
197
197
struct dentry * dentry , struct path * lowerpath ,
198
- struct kstat * stat , struct iattr * attr ,
199
- const char * link )
198
+ struct kstat * stat , const char * link )
200
199
{
201
200
struct inode * wdir = workdir -> d_inode ;
202
201
struct inode * udir = upperdir -> d_inode ;
@@ -240,8 +239,6 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
240
239
241
240
mutex_lock (& newdentry -> d_inode -> i_mutex );
242
241
err = ovl_set_attr (newdentry , stat );
243
- if (!err && attr )
244
- err = notify_change (newdentry , attr , NULL );
245
242
mutex_unlock (& newdentry -> d_inode -> i_mutex );
246
243
if (err )
247
244
goto out_cleanup ;
@@ -286,8 +283,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
286
283
* that point the file will have already been copied up anyway.
287
284
*/
288
285
int 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 )
291
287
{
292
288
struct dentry * workdir = ovl_workdir (dentry );
293
289
int err ;
@@ -345,26 +341,19 @@ int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry,
345
341
}
346
342
upperdentry = ovl_dentry_upper (dentry );
347
343
if (upperdentry ) {
348
- unlock_rename ( workdir , upperdir );
344
+ /* Raced with another copy-up? Nothing to do, then... */
349
345
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 ;
357
347
}
358
348
359
349
err = ovl_copy_up_locked (workdir , upperdir , dentry , lowerpath ,
360
- stat , attr , link );
350
+ stat , link );
361
351
if (!err ) {
362
352
/* Restore timestamps on parent (best effort) */
363
353
ovl_set_timestamps (upperdir , & pstat );
364
354
}
365
355
out_unlock :
366
356
unlock_rename (workdir , upperdir );
367
- out_put_cred :
368
357
revert_creds (old_cred );
369
358
put_cred (override_cred );
370
359
@@ -406,7 +395,7 @@ int ovl_copy_up(struct dentry *dentry)
406
395
ovl_path_lower (next , & lowerpath );
407
396
err = vfs_getattr (& lowerpath , & stat );
408
397
if (!err )
409
- err = ovl_copy_up_one (parent , next , & lowerpath , & stat , NULL );
398
+ err = ovl_copy_up_one (parent , next , & lowerpath , & stat );
410
399
411
400
dput (parent );
412
401
dput (next );
0 commit comments