LOCK_MAY_WRITE(9) The Linux VFS LOCK_MAY_WRITE(9)NAME
lock_may_write - checks that the region is free of locks
SYNOPSIS
int lock_may_write(struct inode * inode, loff_t start, unsigned long len);
ARGUMENTS
inode
the inode that is being written
start
the first byte to write
len
the number of bytes to write
DESCRIPTION
Emulates Windows locking requirements. Whole-file mandatory locks (share modes) can prohibit a write and byte-range POSIX locks can
prohibit a write if they overlap.
N.B. this function is only ever called from knfsd and ownership of locks is never checked.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 LOCK_MAY_WRITE(9)
Check Out this Related Man Page
clri(1M)clri(1M)NAME
clri - clear inode
SYNOPSIS
special i-number ...
DESCRIPTION
The command clears the inode i-number by filling it with zeros. special must be a special file name referring to a device containing a
file system. For proper results, special should not be mounted (see WARNINGS below). After is executed, all blocks in the affected file
show up as "missing" in an of special (see fsck(1M)). This command should only be used in emergencies.
Read and write permission is required on the specified special device. The inode becomes allocatable.
WARNINGS
The primary purpose of this command is to remove a file that for some reason does not appear in any directory. If it is used to clear an
inode that does appear in a directory, care should be taken to locate the entry and remove it. Otherwise, when the inode is reallocated to
some new file, the old entry in the directory will still point to that file. At that point, removing the old entry destroys the new file,
causing the new entry to point to an unallocated inode, so the whole cycle is likely to be repeated again.
If the file system is mounted, is likely to be ineffective.
DEPENDENCIES
operates only on file systems of type
SEE ALSO fsck(1M), fsdb(1M), ncheck(1M).
STANDARDS CONFORMANCE
clri: SVID2, SVID3
clri(1M)