diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-10-17 21:03:20 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-10-19 20:33:52 -0400 |
commit | 9a8165fce724d1aba21e2c713ac6ba11dbfecafa (patch) | |
tree | b3c359a5d0428f3fccf6da73a59210f6514f4c7c /fs | |
parent | dd1db2dedc4f6ad736fbba5aa6ecfe6e7c8ee0f4 (diff) |
cifs: track DeletePending flag in cifsInodeInfo
cifs: track DeletePending flag in cifsInodeInfo
The QPathInfo call returns a flag that indicates whether DELETE_ON_CLOSE
is set. Track it in the cifsInodeInfo.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsfs.c | 1 | ||||
-rw-r--r-- | fs/cifs/cifsglob.h | 1 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 2 | ||||
-rw-r--r-- | fs/cifs/inode.c | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 25ecbd5b0404..c6aad775dd6d 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -309,6 +309,7 @@ cifs_alloc_inode(struct super_block *sb) | |||
309 | file data or metadata */ | 309 | file data or metadata */ |
310 | cifs_inode->clientCanCacheRead = false; | 310 | cifs_inode->clientCanCacheRead = false; |
311 | cifs_inode->clientCanCacheAll = false; | 311 | cifs_inode->clientCanCacheAll = false; |
312 | cifs_inode->delete_pending = false; | ||
312 | cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ | 313 | cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ |
313 | 314 | ||
314 | /* Can not set i_flags here - they get immediately overwritten | 315 | /* Can not set i_flags here - they get immediately overwritten |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 0d22479d99b7..178f733a368f 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -353,6 +353,7 @@ struct cifsInodeInfo { | |||
353 | bool clientCanCacheRead:1; /* read oplock */ | 353 | bool clientCanCacheRead:1; /* read oplock */ |
354 | bool clientCanCacheAll:1; /* read and writebehind oplock */ | 354 | bool clientCanCacheAll:1; /* read and writebehind oplock */ |
355 | bool oplockPending:1; | 355 | bool oplockPending:1; |
356 | bool delete_pending:1; /* DELETE_ON_CLOSE is set */ | ||
356 | struct inode vfs_inode; | 357 | struct inode vfs_inode; |
357 | }; | 358 | }; |
358 | 359 | ||
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 6f4ffe15d68d..843a85fb8b9a 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -1309,6 +1309,7 @@ OldOpenRetry: | |||
1309 | cpu_to_le64(le32_to_cpu(pSMBr->EndOfFile)); | 1309 | cpu_to_le64(le32_to_cpu(pSMBr->EndOfFile)); |
1310 | pfile_info->EndOfFile = pfile_info->AllocationSize; | 1310 | pfile_info->EndOfFile = pfile_info->AllocationSize; |
1311 | pfile_info->NumberOfLinks = cpu_to_le32(1); | 1311 | pfile_info->NumberOfLinks = cpu_to_le32(1); |
1312 | pfile_info->DeletePending = 0; | ||
1312 | } | 1313 | } |
1313 | } | 1314 | } |
1314 | 1315 | ||
@@ -1410,6 +1411,7 @@ openRetry: | |||
1410 | pfile_info->AllocationSize = pSMBr->AllocationSize; | 1411 | pfile_info->AllocationSize = pSMBr->AllocationSize; |
1411 | pfile_info->EndOfFile = pSMBr->EndOfFile; | 1412 | pfile_info->EndOfFile = pSMBr->EndOfFile; |
1412 | pfile_info->NumberOfLinks = cpu_to_le32(1); | 1413 | pfile_info->NumberOfLinks = cpu_to_le32(1); |
1414 | pfile_info->DeletePending = 0; | ||
1413 | } | 1415 | } |
1414 | } | 1416 | } |
1415 | 1417 | ||
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index fe4f2ee97b6c..dea9eeb58b00 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -506,6 +506,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
506 | inode = *pinode; | 506 | inode = *pinode; |
507 | cifsInfo = CIFS_I(inode); | 507 | cifsInfo = CIFS_I(inode); |
508 | cifsInfo->cifsAttrs = attr; | 508 | cifsInfo->cifsAttrs = attr; |
509 | cifsInfo->delete_pending = pfindData->DeletePending ? true : false; | ||
509 | cFYI(1, ("Old time %ld", cifsInfo->time)); | 510 | cFYI(1, ("Old time %ld", cifsInfo->time)); |
510 | cifsInfo->time = jiffies; | 511 | cifsInfo->time = jiffies; |
511 | cFYI(1, ("New time %ld", cifsInfo->time)); | 512 | cFYI(1, ("New time %ld", cifsInfo->time)); |