X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Futimes.c;h=aa138d64560a6a3c2133bc70d57e367cc8c1476d;hb=f121159d72091f25afb22007c833e60a6845e912;hp=f4fb7eca10e832f5b9c4405092627b94f4a163dc;hpb=9f4646d28362bc424b8a4c7d09ea1c2f1759371a;p=~andy%2Flinux diff --git a/fs/utimes.c b/fs/utimes.c index f4fb7eca10e..aa138d64560 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -53,6 +53,7 @@ static int utimes_common(struct path *path, struct timespec *times) int error; struct iattr newattrs; struct inode *inode = path->dentry->d_inode; + struct inode *delegated_inode = NULL; error = mnt_want_write(path->mnt); if (error) @@ -101,9 +102,15 @@ static int utimes_common(struct path *path, struct timespec *times) goto mnt_drop_write_and_out; } } +retry_deleg: mutex_lock(&inode->i_mutex); - error = notify_change(path->dentry, &newattrs); + error = notify_change(path->dentry, &newattrs, &delegated_inode); mutex_unlock(&inode->i_mutex); + if (delegated_inode) { + error = break_deleg_wait(&delegated_inode); + if (!error) + goto retry_deleg; + } mnt_drop_write_and_out: mnt_drop_write(path->mnt);