File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -1328,19 +1328,11 @@ static bool nfs_file_has_writers(struct nfs_inode *nfsi)
1328
1328
{
1329
1329
struct inode * inode = & nfsi -> vfs_inode ;
1330
1330
1331
- assert_spin_locked (& inode -> i_lock );
1332
-
1333
1331
if (!S_ISREG (inode -> i_mode ))
1334
1332
return false;
1335
1333
if (list_empty (& nfsi -> open_files ))
1336
1334
return false;
1337
- /* Note: This relies on nfsi->open_files being ordered with writers
1338
- * being placed at the head of the list.
1339
- * See nfs_inode_attach_open_context()
1340
- */
1341
- return (list_first_entry (& nfsi -> open_files ,
1342
- struct nfs_open_context ,
1343
- list )-> mode & FMODE_WRITE ) == FMODE_WRITE ;
1335
+ return inode_is_open_for_write (inode );
1344
1336
}
1345
1337
1346
1338
static bool nfs_file_has_buffered_writers (struct nfs_inode * nfsi )
You can’t perform that action at this time.
0 commit comments